On Mon, Mar 22, 2010 at 4:00 PM, Thierry Koblentz
> Hi Bruno,
>> I've recently noticed a strange behavior, both in Firefox 3+ and IE8,
>> occurring with boxes having overflow different from visible. Assume
>> there is a right float and then an overflow box with a negative left
>> margin. The box is rendered beside the float, but its margin is
>> ignored in Firefox 3+ and IE8. More details and test cases here .
>> I don't see any reason for such behavior, which looks simply wrong.
>> The strange thing is that it did not occur in Firefox 2 and IE7, so I
>> wonder if it could be intended. Has someone any ideas?
>>  http://brunildo.org/test/bfc-neg-marg-float.html
> Thanks for this.
> It is really strange/weird and seems to be the case for *both* sides of the
> box, not just the one opposite to the float.
> Did you try to apply a negative margin on the right *and* left sides of
> these block formatting contexts?
I see indeed that Firefox ignores a negative margin on the same side
of the float as well.
The spec deliberately not very precise about these cases. At
"CSS2 does not define when a UA may put said element next to the float
or by how much said element may become narrower"
So the UA are "allowed" to make those bfc "narrower" as they like :-)
Moreover, the spec now says:
"the _border box_ of a table, block-level replaced element, or element
in the normal flow that establishes a new block formatting context
must not overlap any floats in the same block formatting context".
They mention the "border box" and not the "margin box", so at least on
the same side of the float, ignoring a negative margin is probably not
Bruno Fassino http://www.brunildo.org/test
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/