DocType xhtml1-transitional.dtd ignores table cell height
Posted
by Sameer Shariff
on Stack Overflow
See other posts from Stack Overflow
or by Sameer Shariff
Published on 2008-12-11T09:36:57Z
Indexed on
2010/06/17
18:03 UTC
Read the original article
Hit count: 289
<!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!
© Stack Overflow or respective owner