learning to be human, since 1984
Fix IE 6 Floating Element Double Margin Bug
If you read my last post, you know that I develop for IE6 and why. As is the case, IE6 throws annoying little gems at us, like its non-compliant box model, and the subject of today’s blog: the ever persistent double margin bug.
As the title alludes to, IE6 doubles the right and/or left margin on a floated element unless you declare:
display: inline;
Don’t worry about block-level items losing their width or height: they won’t. This isn’t a comprehensive explanation of the fix; it works for the conditions specified.
| Print article | This entry was posted by sarandi on Thursday 4 February 2010 at 14:30, and is filed under code, css, html/xhmtl, web development. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |