Evolver
10-18-2006, 12:54 PM
I'm building a new site and need to minimize the amount of tables I'm using for layout.
So basically this is what I want to do
header image
table
bottom image
Below is what I'm using for the markup. It seems to work ok In Opera/FireFox but in IE 6 I get a space between the header image and the table but not the bottom image. Also in Netscape 4 the margin : auto does't work and the table stays to the left of the screen. I can fix that using text-align : center but then it center aligns all the table text in the other browsers. I can get rid of the space in IE6 by using margin-bottom : -4px; for the top image but not sure if its the right way.
<!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" xml:lang="en" lang="en">
<head>
<title></title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<STYLE TYPE="text/css">
<!--
body {
margin: 0;
background: #FFFFFF
font-face: Verdana, Arial,Times New Roman;
}
table { margin: auto;
}
-->
</style>
</head>
<body>
<div style="text-align: center;">
<img src="images/top_banner.gif" border="0" alt="Green Cross Logo" />
</div>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="605" height="800" bgcolor="#F4F4F4" valign="top">Content</td>
<td width="5" bgcolor="#F4F4F4" valign="top"><img src="images/cell_seperator.gif" alt="" /></td>
<td width="170" bgcolor="#F4F4F4" valign="top">Navigation</td>
</tr>
</table>
<div style="text-align: center;">
<img src="images/bottom_banner.gif" />
</div>
</body>
</html>
This is what it looks like in IE6
http://www.iroxy.ca/gc/test.gif
Thanks
So basically this is what I want to do
header image
table
bottom image
Below is what I'm using for the markup. It seems to work ok In Opera/FireFox but in IE 6 I get a space between the header image and the table but not the bottom image. Also in Netscape 4 the margin : auto does't work and the table stays to the left of the screen. I can fix that using text-align : center but then it center aligns all the table text in the other browsers. I can get rid of the space in IE6 by using margin-bottom : -4px; for the top image but not sure if its the right way.
<!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" xml:lang="en" lang="en">
<head>
<title></title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<STYLE TYPE="text/css">
<!--
body {
margin: 0;
background: #FFFFFF
font-face: Verdana, Arial,Times New Roman;
}
table { margin: auto;
}
-->
</style>
</head>
<body>
<div style="text-align: center;">
<img src="images/top_banner.gif" border="0" alt="Green Cross Logo" />
</div>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="605" height="800" bgcolor="#F4F4F4" valign="top">Content</td>
<td width="5" bgcolor="#F4F4F4" valign="top"><img src="images/cell_seperator.gif" alt="" /></td>
<td width="170" bgcolor="#F4F4F4" valign="top">Navigation</td>
</tr>
</table>
<div style="text-align: center;">
<img src="images/bottom_banner.gif" />
</div>
</body>
</html>
This is what it looks like in IE6
http://www.iroxy.ca/gc/test.gif
Thanks
