/ Published in: CSS
It’s an Internet Explorer-exclusive bug wherein an element that is floated – and given a margin in the same direction as the float – ends up with twice the specified margin size. The fix is extremely simple. All you have to do is apply a display: inline rule to your floated element.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* Instead of this */ #content { float: left; width: 500px; padding: 10px 15px; margin-left: 20px; } /* Do this */ #content { float: left; width: 500px; padding: 10px 15px; margin-left: 20px; display:inline; }