PDA

View Full Version : CSS and table stretching problems



eilsoe
October 1st, 2003, 05:10 AM
hiya!

How do I get a table to stretch 100% vertically via CSS? If I do, I loose control of all TD's, if I use plain table tag editing, it ruins the W3C standards (which is crutial)... :-\


here it is: www.avalon-rev.dk/pnuc/global.asp

I want the main table to stretch.


thx.

λ
October 1st, 2003, 11:58 AM
.fullHeight {
height: 100%;
}

then assign it to the table.

I think you can keep control of the TD's by only specifying the width in percentages... or only specifying the width of one cell and not the others

eilsoe
October 1st, 2003, 12:32 PM
yeah W3C allows width percentages (while not height, st00pid).. :-\


however, it's nothing width related I'm concerned about, it's just when I set the height to 100% via CSS, I can't control the height of any TD's anymore.

I tried your method njs :) it's the same method I figured out yesterday... still won't work :-\

lostinbeta
October 1st, 2003, 12:48 PM
When you define a whole table to be a percentage width it will effect the TDs inside, because they have to accomodate the area that doesn't get filled if you defined an exact width.

So what you will have to do is define a percentage width for all the TDs inside so they fill the area you want. It's one of the disadvantages to relative sizing over static sizing :-\