This is the way I would do this.
Code:
<div id="top-section"> <!-- Try to make these divs meaningful divisions and name them something semantic -->
<div class="content-wrapper">
<!-- Top content here -->
</div>
</div> <!-- End top section -->
<div id="bottom-section">
<div class="content-wrapper">
<!-- bottom content here -->
</div>
</div> <!-- End bottom section -->
And the CSS:
Code:
#top-section {
background-color: #fff;
}
#bottom-section {
background-color: #06c;
}
.content-wrapper {
width: 80%; /* Specify whatever width you want here */
margin: 0 auto; /* Setting left and right margins to auto will center any element with this class */
}
Bookmarks