Back to Chromium

Negative Margin On Element Avoiding Floats With Margin On Parent

third_party/blink/web_tests/fast/block/float/negative-margin-on-element-avoiding-floats-with-margin-on-parent.html

149.0.7827.2876 B
Original Source

A box with negative margin should drop it in order to fit next to floats rather than push below the floats. It should drop the margin even when there is margin available in the containing block for the box to expand into. The behaviour here is not defined by CSS2.1 so this behaviour is for compatibility with IE and FF. IE expands the table into the margin of the parent, FF does not. We match FF. Presto expanded all the boxes into parent's margin.

float

margin-left:-200px; overflow:auto;

float

margin-left:-200px; overflow:hidden;

float

margin-left:0; overflow:auto;

float

margin-left:-200px; overflow:visible;

float

margin-left:-200px; display:table; blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah