Center Yourself
Place a div around the main content of your page, apply the id “content” to the div and use the following CSS command:
#content {
width: 700px;
margin: 0 auto;
}
This will put an automatic margin on both sides of the page’s content, ensuring that it’s always placed in the center of the screen. Seems all well, but not quite. There is still the pre-IE 6 on PC to worry about, because IE is of the devil. Add these CSS commands:
body {
text-align: center;
}
#content {
text-align: left;
width: 700px;
margin: 0 auto;
}This will place your content in the center of the page and left-align the text withing the content div.





