Centering Fixed-width CSS Layout

<style type="text/css">
    #container{position:relative; margin:auto; width:760px;}
    #logo     {position:absolute; width:760px; left:0px;  top:0px}
    #nav      {position:absolute; width:200px; left:0px;  top:100px}
    #content  {position:absolute; width:400px; left:200px; top:100px}
    #link     {position:absolute; width:160px; left:600px;top:100px}
</style>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
</head>
<body style="margin-top:0px">
    <div id = "container">
        <div id = "content">this is the <em>CONTENT</em> part</div>
        <div id = "logo">this is the <em>LOGO</em> part</div>        
        <div id = "nav">this is the <em>NAV</em> part</div>        
        <div id = "link">this is the <em>LINK</em> part</div>
    </div>    
</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *