RowanReid
Joined: 04 Apr 2008 Posts: 1
|
Posted: Tue Apr 08, 2008 9:54 am Post subject: Fixed <TR> height in table with strict doctype |
|
|
Hi There,
I have included my code below. The table looks correct in Firefox 2 and Safari 3 but not IE7.
I am attempting to create a table that fills up the entire page with a fixed width row at the bottom. IE7 ignores the height I have set for the second row and makes both rows the same height.
Note that the Doctype tag is important here, if I remove it then the page looks correct, however it is my intention to ensure the browser runs in standards mode. As far as I am aware my code is correct.
Any help or advice would be appreciated.
| Code: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style>
html,body{
margin:0;
padding:0;
height:100%;
border:none;
}
</style>
</head>
<table height="100%" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr>
<td>
Line 1
</td>
</tr>
<tr style="height:10px;">
<td>
Line 2
</td>
</tr>
</table>
</html>
|
|
|