keeping page content centered at different window sizes -
11-28-2007
, 12:56 AM
I know there is a way keep your site's content centered no matter what the size
of the window is. However I am having a terrible time try to find it in my work
books and under the help menu. Anyone know how to do this?
Re: keeping page content centered at different windowsizes -
11-28-2007
, 01:59 AM
Use a div, then in the style set a width say 80%, then have margin-left:auto;
and margin-right:auto; in your stylesheet. There are other ways but this is
simple and i think its W3C compliant.
<body>
div id="wrapper">
CONTENT
</div>
</body>
Then in your CSS:
#wrapper {
width:80%;
margin-left:auto;
margin-right:auto;
}