Margin: 0 auto does not works in IE6
Jan/100
Few days back while working on a project I created a simple <div> statement and gave it a class name which had margin:0 auto applied to it. As expected the div was centered in Firefox (my favorite developer browser… thanks to great add-ons like web developer and many more)… and with my usual tendency of checking the page in IE6 the div was aligned all the way to the left causing the whole layout to be f$#%$@ up!!
After spending at-leastĀ half ‘n hour tearing down the whole layout upside down thinking that there is some other element which is interfering with the layout I had no success and for another nth time I said to myself “I hate IE6″.
Long story short… it turns out that the solution for my problem was very simple. I was missing the <doctype> which resulted IE6 to go in quirks mode.
Further readings:
No comments yet.
Leave a comment
No trackbacks yet.