[web] Making a Table Column Span the Rest of the Page?

Started by
4 comments, last by evolutional 19 years, 6 months ago
I have 2 rows in a table, with the first row having a fixed height. How do you make the second row span the rest of the page vertically?

 __________________________________________
|          |                               |
|          |                               |
|          |                               |
|__________|_______________________________|
|          |                               |
|          |                               |
|          |                               |
|          |                               |
|          |                               |
|          |                               |
|          |                               |
|          |                               |
          span the rest of the page
    |         |           |           |
    V         V           V           V
.:<<-v0d[KA]->>:.
Advertisement
<td height="100%"> add height="100%" to your td.
100%
Rob Loach [Website] [Projects] [Contact]
you may also want to add the height attribute as 100% to your table, just for compatability with older browsers.
Just so you know, I don't think there is any simple way to guarantee that you can take up 100% of the vertical height in any browser. Vertical stuff is not very well defined and some browsers have been known to require that you give the body, and even html elements 100% height too for this sort of thing to work.
I agree with Kylotan. height:100% is represented differently in browsers. For example, one may have it as 100% of the document, another (IE6) may have it as 100% of the view window (especially for CSS). Make sure you have the right DOCTYPE for your HTML, that's one way you can at least try to get the browser to adhere to a standard.

This topic is closed to new replies.

Advertisement