CSS and centering pages..

Live forum: http://forum.freeipodguide.com/viewtopic.php?t=8789

EatChex89

15-03-2005 21:44:18

does anyone know how to center an entire page with CSS? i'm doing that css zengarden (www.csszengarden.com) where you can only use CSS to format the pages.. but i can't find how to center an entire page with CSS...

and i can't use the <CENTER> </CENTER> tag..

shifuimam

15-03-2005 21:57:48

If you're JUST using CSS, do this in the BODY class

text-align center

That should effectively center all text that isn't in a table on the screen. You can also use DIV layers to position various elements, which may override that element.

EatChex89

15-03-2005 22:02:56

yea but i want to center EVERYTHING not just the text.. here i'll upload it.. http//offersource.info/zengarden/index.html

i want that whole document centered.. not just the text.

EpidemiK

15-03-2005 22:14:16

margin-left auto; margin-right auto

EatChex89

15-03-2005 22:22:38

[quotec0c7e5cf42="EpidemiK"]margin-left auto; margin-right auto[/quotec0c7e5cf42]

you're the greatest.. i saw that in another css zen garden's source code.. didn't know thats what it did, but now that i know.. thanks!

shifuimam

15-03-2005 22:40:18

I did that myself - but it only seems to work in IE, not FireFox. Any ideas?

hovigga

16-03-2005 16:00:08

Well, if you have a graphical layout, some of that might not help. I suggest going to sitepoint.com and going to their forums

EatChex89

16-03-2005 16:25:32

[quote0b7fa13dd6="hovigga"]Well, if you have a graphical layout, some of that might not help. I suggest going to sitepoint.com and going to their forums[/quote0b7fa13dd6]

thanks, i got it tho...

hovigga

16-03-2005 16:25:59

ah, lol. nvm.