DocType xhtml1-transitional.dtd ignores table cell height
- by Sameer Shariff
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<link href="Stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table style="height: 100%; width: 100%;">
<tr>
<td colspan="2" style="height: 100px;">Header</td>
</tr>
<tr>
<td style="width: 180px;">Links</td>
<td>Content</td>
</tr>
<tr>
<td colspan="2" style="height: 25px;">Footer</td>
</tr>
</table>
</body>
</html>
Stylesheet.css looks as follows:
*
{
margin: 0;
padding: 0;
}
html, body
{
height: 100%;
width: 100%;
}
Row 1 and 3 above have fixed heights. Row 3 is not filling the remaining space. If i omit the doctype, it works as expected. I need to use this doctype.
Please help!
Thanks!