View Full Version : 1 small question

03-08-2004, 04:30 AM
I built a website that is 800px wide, how do i make it stay centered in other resolutions like 1024x768?

www.bluesfear.com <== thats what im talking about if im being to vague.

03-08-2004, 04:44 AM
<div align="center">
Your content


03-08-2004, 10:48 AM
Since the align attribute is deprecated, from a separate-content-from-presentation point of view, the preferred method would be to specify margin-left: auto; margin-right; auto for the element containing your content (typically a div); since IE doesn't buy this, for it to play nice you can specify text-align: center for the element containing the container element (body?), then for the container element text alignment can be corrected again if needed.

03-08-2004, 11:29 AM
And just to make what ronald said a little more clear....

<div id="container">
.......current layout goes here.......


margin:0 auto;
text-align: left;