Forum Moderators: open
<html>
<head>
<title>Hello World</title>
<style type="text/css">
body
{
background-color: #039;
margin: 0 auto;
text-align: center;
}
td
{
font-family: Tahoma;
font-size: 10px;
color: 8B96A7;
font-weight: normal;
}
.defined
{
width: 775px;
height: 360px;
background-color:white;
font-family: tahoma;
font-size: 16px;
font-weight: normal;
color: black;
vertical-align: top;
padding:10px;
}
</style>
</head>
<body>
<div>
<table width="775" border="1" cellpadding="0" cellspacing="0" style="border-style: sold; border-color:black;">
<tr>
<td colspan="2">
<img src="a.gif" width="775" height="127" alt="">
</td>
</tr>
<tr align='center'>
<td colspan="2" bgcolor="CCCCCC" >
<a href="index.php" class="b"><font size="4">Home</font></a> ¦
<a href="about.php" class="b"><font size="4">About us</font></a> ¦
<a href="contact.php" class="b"><font size="4">Contact</font></a>
<br />
</td>
</tr>
<tr>
<td colspan="2" class ='defined'>
Hello World!
</td>
</tr>
<tr>
<td colspan="2" align="center" valign="top" bgcolor="CCCCCC" class="text3">
<br />
<a href="index.php" class="b">Home</a> ¦
<a href="about.php" class="b">About us</a> ¦
<a href="contact.php" class="b">Contact</a>
<br />
<font size='1'>Copyright </font>
<br /><br />
</td>
</tr>
</table>
</div>
</body>
</html>
table { margin: 0 auto; ) IE6 gets this right if you're using a doctype but breaks and goes back to text-align if you're not.
If you want to centre the div directly then you'll need to give it a specific width, as divs by default fill all available horizontal space.