Develop - advanced functionality > Centering

April 19, 2007 at 20:48 GMT

Ok, I can't figure this one out....I noticed that my pages do not center in the screen...I've tried diffrent places on the edit current style page to center the page, so.....

where do I put the center command (align: center:) on the edit current style page to make this happen?? And is this the correct command??
I tried to look at the view source on windows explorer on a page that is centered but (i guess thankfully) i can't swipe code that way...
help danny

April 21, 2007 at 10:12 GMT

Hi Jerry,
You were on the right path adding a center to the stylesheet.
However CSS can be a little more fickle.
Give this a try...
in the body remove "align:center; "
then replace "margin:10px 0px 0px 50px;"
with "margin:0px auto;"

and the in table#main remove " align:center;"
and replace "margin: 0px;" with "margin: 0px auto;"

The margin style reads clockwise from the top.
So "margin:10px 0px 0px 50px;" pads 10pixels on top, 0 on the right and bottom and 50 pixels on the left. This is what keeps you content to the left edge.
"margin:0px auto;" will put 0px on top and center the remaining edges.
That should do the trick.