Forum Moderators: open
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="screen">
body {font-family: Arial, Helvetica, sans-serif; color: #000; margin:0px; padding:0px;}
#Content {
position:absolute;
left:50%;
width:100px;
margin-top:-303px;
margin-left:15px;
text-align:left;
padding:5px;
line-height: 0.0em;
z-index:2
}
h1 {
font-size:12px
}
p {
font-size:10px
}
</style>
</head>
<body>
<table width="801" height="558" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
</tr>
<tr>
<td height="55" bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
<td> </td>
<td> </td>
<td bgcolor="#CCCCCC"> </td>
<td> </td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
</tr>
</table>
<div id="Content">
<h1>Gray Box</h1>
<p>Bla, bla, bla</p>
<p>Bla, bla, bla</p>
</div>
</body>
</html>
In IE for PC everything looks fine.
But in the example you post, IE6 does not obey the height="55" on the middle row, which I assume is a requirement?
height is not actually a valid attribute on the TABLE element, despite browsers having supported it since the year dot. So you could try setting the height on the first TD in each row: 251, 55, 252 respt (Total=558) - this at least seems to make your example table consistent across browsers (Win: IE6, FF1.5, Op8) and should validate.
There are other issues however with your #Content DIV. And as tedster suggests this is certainly at least part due to browser differences in the default margins on H1 and P elements. Try setting margin:0 on both of these.
Also, watch the missing ';' on your last property values in each rule - as it caught me out! I'd always add a ';' at the end of each property value, so as to reduce the chances of error when you add more.
line-height:0.0em
You'll certainly want to increase the line-height once you've adjusted the above rules!
<edit> You'll probably want to change to an HTML DOCTYPE or at least add the appropriate XHTML attributes to your HTML element.