I have done it before so I don't know why this isn't working by i'm trying to center the content useing margin: auto; works fine in Firefox but IE isn't cooperating. Strange thing is I am useing this almost exact same code on another website and it works fine...
I'm sure its something simple, maybe you can spot it?
There was some
css for the anchors but as that code wasn't important I removed it for length.
*does some extra testing* aparently removeing the "<?
xml version="1.0" encoding="UTF-8"?>" makes IE display it properly, anyone know why this happens?
- HTML: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
<!--
.* { margin: 0px; padding: 0px; }
div#body { margin: auto; width: 760px; }
div#header { background-image: url(head_01.jpg); width: 760px; height: 227px; }
div#links a { display: block; float: left; }
-->
</style>
</head>
<body>
<div id="body">
<div id="header"></div>
<div id="links">
<a id="home" href="#"></a><a id="chat" href="#"></a><a id="forum" href="#"></a><a id="manual" href="#"></a><a id="about" href="#"></a><a id="rule" href="#"></a><a id="term" href="#"></a>
</div>
<div>Content...</div>
</div>
</body>
</html>