Forum Moderators: not2easy
This is a greatly simplified example of the problem I am having:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test</title><style type="text/css">
HTML, BODY
{
MARGIN: 0px;
HEIGHT: 100%;
}
TABLE
{
HEIGHT: 100%;
WIDTH: 50%;
BORDER: #000080 3px solid;
MARGIN: 0px auto;
}
TD
{
BORDER: navy 1px solid;
TEXT-ALIGN: center;
}
.Cell1, .Cell3
{
HEIGHT: 20%;
}
.Cell2
{
HEIGHT: auto;
}
</style>
</head><body>
<table>
<tr>
<td class="Cell1">Top Row - Set to: 20%</td>
</tr>
<tr>
<td class="Cell2">Center Row<br>Should expand vertically to fill remainder of table</td>
</tr>
<tr>
<td class="Cell3">Bottom Row - Set to: 20%</td>
</tr>
</table>
</body>
</html>
I would expect this to render the top and bottom cells at a height of 20% of the viewport, with the center cell expanding to fill the remaining vertical space. In Netscape, or IE in "quirks" mode, this is if fact how it renders. In IE in "compliant" mode however, the center cell is reduced to slightly more height than required by the contents, and the top and bottom cells expand equally to fill the remainder of the viewport.
Am I just missing something stupid here, or is this a bug in IE in "compliant" mode?
Thank you in advance for your assistance.
-Lance
and please accept apologies.. can't believe we all missed this so long - sorry!
there's nothing wrong with the question at all, but as far as I know you've answered it yourself. It will only work in IE quirks, I'm not sure that's it an IE bug though I think it more that "height" is not actually a supported attribute of tables, but I will need to check for actual confirmation of that.. bit rusty with the ol' tables and I seem to remember this may have been asked over on the HTML forum quite recently too
Anyone have the link or can add more facts?
Suzy