views:

113

answers:

2

Hi all!

I'm just a bit CSSing, and I have this code:

#page
{
    width: 950px;
    margin: 0px auto;
}

I have a div with id="page". I opened my page in IE6, and it just worked. Since when do auto margins work in IE6? Can somebody explain me why it works? Thanks

BTW my doctype is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
+2  A: 

IE6 does support centering via margin:auto, as long as the document is in standards mode not quirks mode.

IE6 was the first IE version to support it.

RichieHindle
+1 Thanks, I Googled quirks mode ie6 and I understand it.
Time Machine
Well, that's just embarrassing. I've been using `text-align: center` for IE6 for *years* because I thought it didn't support this. +1
Ben Blank
A: 

Always. IE 5.5 has the trouble.

meep