Margin: 0 Auto Not Working In Ie Only
I am trying to center a div #logo_alt containing an image using margin: 40px auto 0px auto;. Problem:: On Chrome, it looks perfect, but in IE, this img-containing div is aligned to
Solution 1:
The HTML file start off with
<html xmlns="http://www.w3.org/1999/xhtml">
.
Well there's your problem. You need to give your document an XHTML doctype declaration since your root element has that xmlns
attribute anyway. Then IE will work in standards mode and render your margin: 0 auto
style correctly.
Post a Comment for "Margin: 0 Auto Not Working In Ie Only"