On Thu, 28 Jun 2007 15:58:08 -0400 (EDT), Michael Leibson wrote:
>
> Re. previous post:  I later realized that in order to center a div using 
> margin:auto in
> IE6, I needed to get IE6 into Standards mode via entering a Doctype!
>
[...]

If you want to center your DIV in IE 5.5, or in later versions in
"compatible" mode (e.g. w/o a DOCTYPE) you can do this:

body {
  margin: 0;
  text-align: center;
}
div {  /* or its ID if you have more DIVs */
  margin: 0 auto;   /* as you state */
  text-align: left;
}

Explanation:
In "compatible" mode, IE erroneously centers block items when you
tell it to center text. The "margin: 0 auto;" centers modern browsers,
but you have to re-assign text alignment (unless you want it centered).

>
> Sorry to trouble you!

No trouble at all.

Cordially,
David
--


______________________________________________________________________
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