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. :)

Understanding JavaScript Promises E-book Cover

Demystify JavaScript promises with the e-book that explains not just concepts, but also real-world uses of promises.

Download the Free E-book!

The community edition of Understanding JavaScript Promises is a free download that arrives in minutes.