Click to See Complete Forum and Search --> : Centering the whole thing...


Fembot
04-09-2006, 12:20 AM
I'm working on a website with a "book" theme. Can anyone tell me how to center it?

Right now, everything is hugging the left but I realized that it looks awful on larger screens. If only I could make it all center itself on the screen vertically and most importantly, horizontally.... Is this possible?

Here is a link to the first page http://www.tiwani.com/

I really would appreciate any and all help anybody can offer

ray326
04-09-2006, 12:35 AM
Get rid of that first line XML command. Change the body text-align to center. Change the container margin to margin:0 auto;. Put a body tag on the page.

Fembot
04-09-2006, 01:01 AM
THANK YOU for responding! (I know it's painfully obvious that i'm new to this)


How do I center it vertically? is that even possible? I just don't want it sitting at the very top of any huge screens...

Davey_M
04-09-2006, 04:22 AM
in the container put

margin-top:auto;
margin-bottom:auto;

i'm just learning css myself but that might work the same as aligning horizontal

ray326
04-09-2006, 10:05 PM
Nope. Vertical auto margins are zero.

Fembot
04-11-2006, 06:08 PM
thanks!

felgall
04-12-2006, 02:14 AM
For centring your content both horizontally and vertically see http://www.felgall.com/cshow03.htm