View Full Version : Center entire page in browser

01-17-2008, 06:29 AM
How can I center a fixed width page in the browser window without tables?

I've tried the fixes in existing posts, but they don't seem to do it here.

page is at www.mymangosteencards.com


01-17-2008, 06:58 AM
Hello passingthrough,
Your on the right track by using margin left/right auto and using a doctype... it's trying to center your #content but the 1800px width is just too wide.
Narrow that down to 900px or so and see -
width: 900px;
position: relative;
margin: 0 auto;
background: #000;
height: 3000px;
text-align: left;

There is still plenty of other problems though. All the absolute positioning is really messing things up. Try removing the height:3000px; and you'll see the black background disapear.

Run your code through the validator and see if fixing as many errors as you can doesn't improve things - see my suggestion and links about validating in my sig below.