CSS table height 100%

Associate
Joined
11 Mar 2004
Posts
90
Hi There, I am setting a table height to 100% in CSS2, however when I do this the td tags are simply ignored height was and they expand relative to the window?? Before using css2 I could get away with specify 2 of the 3 table cell heights and the 3rd would just expand with the others fixed. Is this no longer possible or is there an easier way to solve it?

Thanks for any help in advance
 
What are you using the tables for? There may be a much easier way to do what you're doing using CSS2 than you're aware of.
 
so far I have not been able to have a layout that resizes to fit the window vertically using totally css2 layout, so I have reverted back to using tables aswell.

Ill post a link as soon as I can show an example, it maybe clearer to see what I am trying to do then
 
Setting the height of the TABLE element to 100% only sets it to 100% of it's container. You'll also need to set the HTML, BODY to 100%.
 
There are two issues here. First of all, you shouldn't set the height of TD's, TR's or TH's. They have been made obsolete by the W3C, because browsers are supposed to stretch tables as needed. The way to solve the problem is to use col and colgroup and set the heights. You can check W3C for details of how to use those tags.

Secondly, here is a link on what is/isn't possible with regards to 100% height of a container - http://www.quirksmode.org/css/100percheight.html
 
Back
Top Bottom