View Full Version : center positioning

08-17-2005, 11:15 PM
i am making a site that is centerd in the browser. i usually use absolute positioning, but this doesnt work since it needs to be centered. i tried relative positioning, and used negative numbers to overlay a picture. this doesnt seem optimal, also because the browser continues to scroll down to the point where it should be. is there a diiferent slution that i am overlooking?
thank you

08-21-2005, 08:27 PM
Hi there.

GIve your content a wrapper div with the following:

#wrapper {
positioned: relative;
width: xxxxpx;
height: auto;
margin: 0px auto;

set the body to:

body {
text-align: center;

This works fine in all browsers,
hope it helps mate