Point of clarification.
I understood that "margin: 0 auto" worked in IE6, but IE 5.0 and 5.5
required the use of "text-align: center" in the body rule therefore why do
I need "margin: 0 auto" in both the body and container?
Please advise...
Thanks,
Mario
> [EMAIL PROTECTED] wrote:
>
>>The basic CSS syntax is as follows:
>>html
>>{height: 100%;
>> margin-bottom: 1px;}
>>
>>body
>>{margin: 0;
>> padding: 0;
>> text-align: center;
>> font: normal 12px verdana, arial, sans-serif;
>> background: #fff;}
>>
>>#container
>>{margin: 0 auto;
>> width: 760px;}
>>
>>
> Regarding margins and padding, simpler is
> * {margin : 0; padding : 0;}
> Zeroing all default margins and paddings helps achieve better cross
> browser rendering, as well as lists which are semantically, but not
> presentationally, a list (i.e., navigation lists).
>
> For the font size, under normal circumstances, use only percent or ems.
> (Were it properly supported, you could also use exs, but afaik, all
> browsers just use 2ex=1em.) When pixels are use, IE users cant change
> the font size to allow for easier reading. You may also want to increase
> the line-height as it too, makes reading easier.
>
>>3. Text-align: center set to center the page in Internet Explorer 5.0 &
>> 5.5
>>
>>
> If you have an extra style sheet for IE (hidden using conditional
> comments), you might want to put this hack there. Also, don't forget to
> reset the alignment.
>
>>4. Margins must be set to "0" & "auto" in order to center-align a
>> fixed-width layout in IE6, Firefox, Mozilla, Netscape and Opera.
>>
>>
> You're right about setting left and right to "auto", but there's no need
> to set top and bottom to 0 (unless you want to).
>
>>5. Placing "margin: 0 auto" in the declaration block for the body rule
>> doesn't center-align the layout therefore this particluar declaration
>> must be placed inside an "ID" and applied to a wrapper or container
>> div.
>>
>>
> Wrong; the setting goes in the body in order to center the container in
> IE<6.
>
> HTH
> ******************************************************
> The discussion list for http://webstandardsgroup.org/
>
> See http://webstandardsgroup.org/mail/guidelines.cfm
> for some hints on posting to the list & getting help
> ******************************************************
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************