View Full Version : Can't Center...please help!

08-03-2010, 04:48 PM
I've been going crazy over this for an hour. Hopefully someone can help. It's a small .css

I have one div that is 100% and text align center (.wraper). I then want another div to contain the main content (.container) and have it a static width of 800px. No matter what I do, the container is always all the way to the left. How do I get the container to be centered on the page. I don't want to use margins because I want it to be centered no matter what the resolution or screen size. Thanks for any input :)

The site is www.tanseekers.com and .css is www.tanseekers.com/style.css

08-03-2010, 05:18 PM
all you have to do is add a margin of auto and it will center no matter what the screen size is.

.container {width:800px; margin:auto }

08-03-2010, 05:33 PM
Thank you sooooo much! I though I had already tried that but maybe I had it in the wrong div. Works great now!

08-03-2010, 05:36 PM
no problem, love the background btw.