问题
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">
回答1:
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.
来源:https://stackoverflow.com/questions/1181862/ie6-auto-margin-works-how-is-this-possible