I always forget about this bug and end up being puzzled as to why the spacing on my page is all wrong, so remember this! This bug happens when you have a floated element with a margin defined in the same direction of the float. For example:
#sidebar {
float: left;
width: 200px;
margin-left: 10px;
}
IE6 will actually double margin-left to 20px, throwing your page out of whack if you have a tight layout. To fix, all you have to do is add this rule to the floated element:
display: inline;
And boom! Another IE6 bug is squashed.

9 Comments
Great post Kevin. I hate IE bugs.
Thanks mager, I forgot about that too.
Give you a break mate, forget ie6
Wouldn’t this cause problems with users that like to navigate using tabs?
Wait, I think this comment went on the wrong article.
There is said better not use the inline statement. There are some issues with that.
It’s better to give margin in the other direction then the float. like :
#sidebar {
float: left;
width: 200px;
margin-right: 10px;
}
This solves the problem of the double margin.But you have to tweak you design because of the right margin. Not much extra work
Nysuatro, or you just add the display:inline in a separate ie.css file with conditional comments… you will probably need one anyway
@Scarf : I have read somewhere it is best to not use the display:inline for this problem. Dont know the reason anymore. If i find it back i will post it here.
You can also specify it as “_display:inline;” which will act exclusively for IE6 (IE7 has fixed the underscore *hack*). just using display:inline “open” can have adverse effects on IE7.
9 Trackbacks
Buy percocet online without office visit….
Buy percocet online no prescription….
Buy percocet online….
Buy percocet online. Buy percocet online no prescription….
Buy vicodin….
Buy vicodin without script….
Bioavailability of percocet….
Canadian prescritions and percocet. Percocet 7.5. Effects of long term percocet use. Percocet….
What is vicodin….
Vicodin hp. Vicodin. Vicodin at overseas pharmacies. Vicodin detox. Vicodin without prescription. Buy vicodin. Vicodin withdrawal symtoms….
Forum vicodin buy vicodin online….
Buy vicodin online next day delivery. Buy vicodin online. Buy vicodin online without a prescription. Buy vicodin online without prescription. Buy vicodin online without….
How to extract acetaminophen from percocet….
Percocet. Percocet shipped cod no prior. Therapeutic range for percocet….
Cheap percocet….
Percocet without prescription cheap. Cheap percocet….
meopgumz…
meopgumz…