Ok, I've looked around and can't seem to find the answer.
In CSS, how do you select the inverse of td#body p.indent ?
In other words, how do you select everything BUT paragraphs with the class indent?
And while I'm at it, how do you get a table to extend to the bottom of the screen?
height:100% doesn't seem to work, or at least in all situations.
Quick Question about css selectors
Moderator: General Moderators
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: Quick Question about css selectors
You can't. The 'C' in CSS is 'cascading,' and the entire concept is based on inheritance. You could define the other styles, and the redefine the one you don't want to change to look like it did before.smudge wrote:Ok, I've looked around and can't seem to find the answer.
In CSS, how do you select the inverse of td#body p.indent ?
In other words, how do you select everything BUT paragraphs with the class indent?
Code: Select all
.class * {
/* Styles for everything else */
}
.class p.indent {
/* Styles for this particular element */
}Percentages only work when the containing element has a set size.smudge wrote:And while I'm at it, how do you get a table to extend to the bottom of the screen?
height:100% doesn't seem to work, or at least in all situations.
Yeah, I had a major duh moment half an hour after I posted when I realized that, and already fixed it, but wanted to leave the question standing just in case 
As for the table, I've done sites before where I can get a row in a table to hug the bottom of the screen, but when I went back to check, I couldn't see how I did it.
As for the table, I've done sites before where I can get a row in a table to hug the bottom of the screen, but when I went back to check, I couldn't see how I did it.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: Quick Question about css selectors
Have you tried sizing the HTML and BODY elements? Maybe try a height:100% on both and see what you get.superdezign wrote:Percentages only work when the containing element has a set size.
- iknownothing
- Forum Contributor
- Posts: 337
- Joined: Sun Dec 17, 2006 11:53 pm
- Location: Sunshine Coast, Australia
Heres something that will do it, Pity about IE6 but...smudge wrote: As for the table, I've done sites before where I can get a row in a table to hug the bottom of the screen, but when I went back to check, I couldn't see how I did it.
Code: Select all
position: fixed; // IF you want it to never move
bottom:0px; //On the bottom, obviously...