Making a table height="100%"

  • Thread starter Thread starter Nathan Sokalski
  • Start date Start date
N

Nathan Sokalski

I have a table that I want to be the entire height of the browser window. To
do this, I used the following table layout:

<table border="0" cellpadding="0" cellspacing="0" class="MarginPaddingZero"
height="100%" width="100%">
<tr><td align="center" bgcolor="#a080c0" colspan="2"
width="100%"></td></tr>
<tr height="100%">
<td valign="top" nowrap="nowrap" align="left" bgcolor="Silver"></td>
<td class="ContentCell" valign="top" width="100%"
align="center"></td>
</tr>
</table>

The width="100%" seems to be doing what I expect, but the height="100%" does
not seem to be doing anything. What do I need to do to make my table span
the entire height of the browser window? Thanks.
 
Hi Nathan,

You may like to try the following forum in the future, this newsgroup is for
IE6 user issues.

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=923&SiteID=1

I have used 100% w and h tables to format popup dialogs. Usually I first
create a table with 3 rows, and set the height of the 1st and 3rd rows to
say 50px, which will be my header and footers.
In the 2nd row I insert a table that will hold the labels and input fields
of my form. I center this table within the the table cell.
Oh, you have to specify the body style with no overflow.
<body style="overflow:hidden".....
Thats probably why you think it is doing nothing with the height
attribute... Also design time and run time renderings are quite different.
Regards.
 
Back
Top