On 7/1/07, Michael Leibson <[EMAIL PROTECTED]> wrote:
>
>
> Date: Sat, 30 Jun 2007 14:32:26 -0700
> From: Alan Gresley <[EMAIL PROTECTED]>
> Subject: Re: [css-d] centering elements via margin: auto
>
> . . . If the body had no text alignment (the default is text-align: left)
> then you don't have to restate text-align: left on any element unless an
> ancestor has text-align: center already. The CSS is less complicated if you
> only center what needs to be centered.
>
> . . . Apart from text-align: center centering text, it also centers
> images. The real poison is that for IE, text-align: center will center all
> descendant elements as well, so be careful. The text-alignment that you
> would achieve with the CSS as above could be stated.
>
> #container {margin 0 auto;}
>
> Kind Regards, Alan


Alan, the problem with that is that, at least as of a few years ago, IE6/Win
does not center the container with #container {margin: 0 auto;}, which is
why the text-align: center is applied to the body element. It's precisely
because that rule centers all descendants in IE6/Win that we are using it to
make up for the fact that auto left and right margins won't center the
container in IE6/Win.

Again, I don't know if IE6 SP2 fixes this, but I doubt it. So the workaround
we proposed earlier is appropriate and necessary if IE6/Win behaves as it
did before SP2.

Josue
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to