IE double margin

To fix the notorious double-margin bug in IE6, use the following CSS rule on the offending float:

div.my-offending-float{display:inline;}

This code is preferrably put in an IE conditional tag, sence the CSS statement wouldn’t be needed if it wasn’t for IE6.

It does validate, though, sence floats always assume display:block regardless (yes, even if you try to set it to display:inline).

That means that if you float an <a> or a <span>, elements who are inline by default, it will automatically assume display:block and you do not need to declare it explicitly.

(See article on position is everything for more info)