IE6 Double Margin Bug Fix
Thank you Jayme Blackmon for the simple IE6 Double Margin Bug Fix, and thanks to Google for listing it first.
If you have a floated element such as a div and you place margin-right or margin-left on that element, our most beloved Internet Explorer 6.0 will double that margin value, causing havoc in your html layout. To fix this simply add display:inline; to your floating element. Bah Boom!
Jeremy, a commenter on this post, also added something useful in case display:inline isn't an option.
margin-left:20px;
_margin-left:10px;First one gets read by IE7 and FireFox. Second gets read by IE6. Awesome!
Trackback





Respond Now