• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Need some HTML table help - please

jordank32

Member
I am working on a website for a class and I am having a difficult having tables expand properly. I am going to simplify the code so you can get the general idea. I want a table to take the entire height of the page and have 1 row and 3 columns. I want the top row to be 20 pixels, the bottom row to be 20 pixels, and the center row to fill the rest. The code I have works fine in Firefox but not in IE. IE redistributes all of the row heights evenly. I really need this to work. Please help, here is the code:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<link href="main.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="fullheight">
<tr>
<td height="20" bgcolor="#FFFF00"></td>
</tr>
<tr>
<td bgcolor="#990000"></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFF00"></td>
</tr>
</table>
</body>
</html>

And the .css

html, body{
height:100%;
margin: 0;
padding: 0;
border: none;
}
.fullheight{
background-color: #FFFFFF;
height:100%;
margin: 0 auto;
}
 
hmmmm....
i tried viewing your page in MSIE 6.0 (win2k), and it takes up the full height of the browser window.
what version of MSIE did you try the code on?

works fine on mozilla 1.7.5 as well
 
Originally posted by: jordank32
I want a table to take the entire height of the page and have 1 row and 3 columns. I want the top row to be 20 pixels, the bottom row to be 20 pixels, and the center row to fill the rest.

😕
 
Originally posted by: AFB
Originally posted by: jordank32
I want a table to take the entire height of the page and have 1 row and 3 columns. I want the top row to be 20 pixels, the bottom row to be 20 pixels, and the center row to fill the rest.

😕

sounds like someone hasn't heard of <div> and <span> eh? 😉
 
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" class="fullheight">
<tr height="20">
<td bgcolor="#FFFF00"> test </td>
</tr>
<tr height=*>
<td bgcolor="#990000"> </td>
</tr>
<tr height="20">
<td bgcolor="#FFFF00"> test </td>
</tr>
</table>


I usually set table height in opening table tag, and row heights in the <tr> tags. I believe the above works in IE for what you described.
 
Back
Top