Double margin bug in IE 6.0

The problem:

Recently I developed a site using DIV tags. They are floated on left or right in order to take the appropriate positions. I was very excited because the layout was perfect in IE 7, Firofox for Windows and Safari, Firefox for MAC.

Some days ago I took a look at IE 6 and I was very suprised because some of the images were moved to left in double. After some tests I realized that the “margin-left” style property I initialize is doubled in IE 6. It turned out that in-line elements adjacent to a floated div appear to be indented from their expected location.

The solution:

Add “display: inline;” to the style of the floated element which has the double margin problem.

Go and read “Floats, Margins and IE” article for more information about the problem.

, , , , ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • digg
  • Reddit
  • SphereIt
  • DotNetKicks
  • YahooMyWeb

2 Responses to “Double margin bug in IE 6.0”


  1. 1 Adine Feb 22nd, 2007 at 8:06 pm

    Hi Veselina,
    Thanks for this post, I had this problem and it was driving me insane, you have saved me a lot of time and effort.
    Kind Regards
    Adine

  2. 2 Vesy Feb 23rd, 2007 at 3:11 am

    Hi Adine,

    I’m very happy my post was useful to you.

    Best regards,
    Vesy

Leave a Reply




Google

Blogroll


Blogroll Me!

Enter your email address:

Delivered by FeedBurner







Academics Blogs - Blog Top Sites