
Originally Posted by
alxmaverick
Haha the issue isn't centering and encapsulating. That I have down fine. The problem is that I would like the stripes at the top to extend to the left and the right of the area while everything else (the 1000px wide body) stays in the center. I would also like the silver navigation bar as well as the black area to extend to the edges of the page too.
Actually, it is all about encapsulating and centering. Let me try to explain a different way.
First, change your container's width to 100%;
Code:
#container
{
margin-left: auto;
margin-right: auto;
width: 100%;
text-align: left;
}
Next, change your header's width to 100%;
Code:
#header {
background: #222222;
background-image: url('bg_carbonfiber.png');
float: left;
width: 100%;
height: 100px;
}
Next, add the following CSS style
Code:
div.inner {
width:1000px;
margin:0 auto;
}
Finally, change your markup to this:
Code:
<div id="header"><div class="inner"><img src="title.jpg"></div></div>
Now, your header should stretch the entire width of the page, while the content floats within a 1000px range in the center. Follow the same technique with the rest of your styles!
Bookmarks