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.

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?

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements