The basic idea is to not mess with the body's margin other than to zero it out if desired. You can use a container division with a unique id that holds all the content on the page:
HTML Code:
<body>
<div id="containerdiv">
all content here
</div>
</body>
Use a valid DOCTYPE and avoid all absolute and relative positioning and floats in the content unless you know what you are doing with them. Pick a width for the container - say, 775px, set its style like so:
Code:
#containerdiv {
width:775px;
margin:0 auto;
}
As long as no individual element in the content is greater than that width and all content can wrap if it needs to, that will center it.
Bookmarks