The IE Doubled Float-Margin Bug

It’s both gratifying and annoying when I get bit by an IE bug (that I’ve previously heard about) for the first time.

A coder innocently places a left float into a container box, and uses a left margin on the float to push it away from the left side of the container. Seems pretty simple, right? Well it is until it’s viewed in [Internet] Explorer for Windows. In that browser the left float margin has mysteriously been doubled in length!

The solution? Put display: inline; on the float.

This post first appeared on From the Belly of the Beasts, a weblog from some of the people who build O’Reilly websites.

comments: be first!

name
blog (optional)
comment

monthchunks

license

Justinsomnia is licensed under a Creative Commons Attribution 3.0 License.

Please see my Attribution Policy for more information.