scriptygoddess RSS Feed
 
 
 
 

floated box with extra (unintented) margin

Boy, do I love that "Position is everything" site. Every problem I've been having these days with CSS, the fix can be found there.

Here's today's CSS dilema. Had a simple floated div. Gave it a margin - and for some reason, IE doubled it. The solution is just to add "display: inline;" to the floated div, and all is well.

One Response to “floated box with extra (unintented) margin”

  1. 1
    DianeV:

    I'd not seen that. I'd been using IE hacks to get around the IE-double-the-margin-what-were-we-thinking thing. Display:inline might be more elegant (and less fraught with peril).

    … I really don't know what Microsoft was thinking. Why would they think that, if you specify a 50px margin, what you *really* want is a 100px margin?

Leave a Reply

Bookmarks

WordPress Resources

Meta