scriptygoddess

22 Jan, 2007

floated box with extra (unintented) margin

Posted by: Jennifer In: Bookmarks|CSS|CSS related

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.

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

1 Response to "floated box with extra (unintented) margin"

1 | DianeV

January 28th, 2007 at 6:43 pm

Avatar

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?

Comment Form

Featured Sponsors


  • Curt: If anyone comes across this with similar issues I was able to sort out the pagination issues painlessly with easyCommentsPaginate from http://www.mush
  • Christopher: Yeah, it is indeed hard to do. And something remains elusive about why the pagination never worked. I tried everything I could find. Regardless, I
  • Jennifer: Hi Christopher, always hard to bug test stuff like that remotely. Sorry those didn't help. Glad you found a solution though :)

About


Advertisements