Re: table alignment; how to write
by Andrew McFarland <aamcf(at)aamcf.co.uk>
|
Date: |
Thu, 14 Mar 2002 18:26:01 +0000 |
To: |
thewolves(at)bigfoot.com, Deborah Shadovitz <debshadovitz(at)mac.com> |
Cc: |
hwg-techniques(at)hwg.org |
References: |
mac |
|
todo: View
Thread,
Original
|
|
At 22:22 13/03/02 -0800, Larry Coats wrote:
<snip/>
>Using align="center" in the table tag is the poorest choice, because it's
>only supported in NN 4+ and IE 4+ and of course is also deprecated:
This one has fewer unexpected side effects though. I must put together a
page that demonstrates the weirdness that you can get with IE 6 and <div
align="center">
<snip/>
>Using a div tag with CSS text-align:center works in NN 4+ and IE 3+ and is
>not deprecated.
<snip/>
But it shouldn't work. text-align applies to the line boxes within a block
level element, not to block level elements themselves, and TABLE is block
level.
The correct way to center align block level elements with CSS is to make
the left and right margins equal. Easier said than done, unfortunately.
Andrew
--
http://aamcf.co.uk/
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA