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.

Care to Comment?

Or if you'd prefer to get in touch privately, please send me an email.

Name

Email (optional)

Blog (optional)