Learning something new about CSS and IE6
Every day it seems like I learn another difference between quirks and standards mode in Internet Explorer 6. For the longest time, I’ve operated under the (incorrect) belief that
margin: 0 auto could not be used in IE6 to center something. As it turns out, this is only true in quirks mode. When in standards mode, this code works perfectly. I found evidence over at MSDN: CSS Enhancements in Internet Explorer 6.
I’m not entirely sure how I missed this in my recent development, considering I always use HTML 4.01 Strict. So to all of those with whom I steadfastly argued that
margin: 0 auto would not work in IE6, I apologize. However, I do wish someone would have pointed out why it works so I could’ve figured this out much earlier.
Disclaimer: Any viewpoints and opinions expressed in this article are those of Nicholas C. Zakas and do not, in any way, reflect those of my employer, my colleagues, Wrox Publishing, O'Reilly Publishing, or anyone else. I speak only for myself, not for them.
Both comments and pings are currently closed.