Rick wrote:

> Concerning the "body { text-align: center; }" CSS, it's true, if my
> understanding is correct that all text in the body will be centered with
> that code, but that's why the others recommended putting "text-align: left"
> in the #container code.  Since everything on the page will be placed inside
> the #container, all text on the page will then be left-justified.

I must have missed part of the tread earlier since I see "others recommended 
putting 'text-align: left'". 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.

> Hey, Michael, create a container for your layout (a div that will
> house everything else). Use this code, assuming that div is called
> container
> 
> 
> body {text-align: center;}
> #container {margin 0 auto; text-align: left;}

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


______________________________________________________________________
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