Re: Centering a Div -
10-23-2007
, 10:03 AM
Hi Mick,
Text-align:center; is the worst in my oppinion.
Reason is its a IE only method. and according to W3C standards should not do
anything but center-align text.
And IE does this to all elements.
The visually best method is position absolute and than -margin the half of he
width.
This method gives you the most control over how your page looks only problem
is that when the browser is smaller than the content most of the times u wont
get scrollbars and wont be able to see the menu or some things that are on the
side of the page.
The best method in my opinion is margin: 0 auto;
Only thing is that IE 6 and earlier don't pick this up.
hope this helps,
JK |