Reputation: 674
My page isn't centering and I tried using width: 980px;
as searched up that to fix a page not centering, just state the size of the container/wrapper.
I should mention, I'm using DWT's (Dynamic Web Template) from Web Expression 4.
Body:
<body>
<div id="wrapper">
<div>
<div id="bannerTop" style="position: absolute; width: 980px; height: 10px; z-index: 3; left: 0px; top: 0px" class="auto-style1">
</div>
<div id="banner" style="position: absolute; width: 980px; left: 0px; top: 17px; height: 100px; z-index: 1">
<img alt="Remax Logo" height="97" src="images/remax_logo.png" width="519"></div>
</div>
<div id="topNav" style="position: absolute; width: 980px; height: 50px; z-index: 2; left: 0px; top: 117px">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="switchboard.html">Switchboard</a></li>
<li><a href="properties.html">Property Page</a></li>
<li><a href="contact.html">Contact Us</a></li>
<li><a href="credits.html">Sitemap / Credits</a></li>
</ul>
</div>
<div id="sideNav">
</div>
<!-- #BeginEditable "content" -->
<div id="content" style="position: absolute; width: 777px; height: 563px; z-index: 5; left: 215px; top: 209px">
</div>
<!-- #EndEditable -->
<div id="footerNav" style="position: absolute; width: 995px; height: 49px; z-index: 6; left: 0px; top: 773px">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="switchboard.html">Switchboard</a></li>
<li><a href="properties.html">Property Page</a></li>
<li><a href="contact.html">Contact Us</a></li>
<li><a href="credits.html">Sitemap / Credits</a></li>
</ul>
</div>
</div>
</body>
CSS:
body{
font-family: Arial, Helvetica, sans-serif;
background-color: #F2F2F2;
}
#wrapper{
width: 980px;
margin: 0 auto;
background-color: #FFFFFF;
}
Upvotes: 0
Views: 68
Reputation: 2002
Positioning issue:
#wrapper{
width: 980px;
margin: 0 auto;
background-color: #FFFFFF;
position: relative; /* this fixes it */
}
Upvotes: 4