March 16, 2008...2:02 am

Double margin

Jump to Comments

I have seen this bug many times, whenever you have used float with horizontal margin IE doubles the margin.

Example:
.banner{
float:left;
margin-left:10px;
}

IE will show 20px margin on the left side, it doubles the margin.

Simple fix for this bug is use display property to inline.

Fix:
.banner{
float:left;
margin-left:10px;
display:inline;
}


Bookmark and Share

2 Comments


Leave a Reply