2
niyazpk wrote 1 year ago in response to this comment| link

should come below aaahhhh
this should not come last.

3. On to the main containers

After that it’s time to give the content area a width and center it horizontally. We do that by specifying the width and margins of the main container, #wrap. We also give it a background colour to make it show up on the page.

The method we use to center the content is based on the fact that when an element’s left and right margins are set to auto, they will share whatever is left when the element’s width has been subtracted from that of its container. In this case the width of #wrap will be subtracted from the width of the browser window.

Note: for this method to work in Internet Explorer (version 6 and later only), the document must use a DOCTYPE that forces IE to use its standards mode. Please read Fix Your Site With the Right DOCTYPE! for more info.

#wrap {
width:750px;
margin:0 auto;
background:#99c;
}
After that, we give the different sections of the document different background colours to make them show up.

#header {
background:#ddd;
}
#nav {
background:#c99;
}
#main {
background:#9c9;
}
#sidebar {
background:#c9c;
}
#footer {
background:#cc9;
}