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


  • Michael: You can use get_header(2) in your case. The filename of your custom header has to be header-2.php. The problem with include(your_file.php) is, all
  • cliff: hi wonder if you can help me, pls i designed www.kouga.mobi using dreamweaver CS3 and now want to make the phonenumbers into links so that if you
  • jerey: how do i rewrite this because it tried RewriteEngine on #Options +FollowSymlinks RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FIL

About


Advertisements