Msg#: 3831884 posted 2:11 am on Jan 22, 2009 (gmt 0)
Hi, I've searched for a fix for this and I was surprised that this hasn't been discussed a lot more.
I have a <div> float:left (with a bottom margin) inside a container that has been "clearfixed." IE ignores the bottom margin of the float:left <div> but if I float:right, IE applies the bottom margin. I'm guessing there is no easy fix but I thought I'd post to see if I've missed something obvious.
Msg#: 3831884 posted 4:51 am on Jan 22, 2009 (gmt 0)
While my first idea was that both the clearfix doesn't do a thing in IE, (:after is not supported), that it might be collapsing margins due to order etc (it's none of those obviously). If you just swap left and right on the floats in the css, the problem shifts along.
I stopped trying to find logic in the IE bugs/features (MSFT won't fix them - only make new browsers IE8 is going to save us they claim this time).
The easiest solution I know is to use a conditional comment, throw in all the IE fixes to get the visual representation you seek -even without knowing why IE does what it does (it's a bug, if anybody has a way to find the error in the logic it's the one with the source code in front of his/her nose, but since they won't fix the problem, who really does need to care?)- and forget about the deviant browser.
I'd avoid giving any of the code need to fix the display in IE ("hacks" if you call them like that, or workarounds if you prefer to reserve the term hack for things exploiting the selector bugs only) to compliant browsers and IE8 (it's still promised to be fully compliant, let's take them on their word).