1 | 1 | 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.
|
---|
2 | 2 |
|
---|
3 | 3 | float
|
---|
4 | 4 | margin-left:-200px; overflow:auto;
|
---|
5 | | PASS
|
---|
| 5 | FAIL:
|
---|
| 6 | Expected 500 for width, but got 700.
|
---|
| 7 |
|
---|
| 8 | <div class="box" data-expected-width="500">margin-left:-200px; overflow:auto;</div>
|
---|
6 | 9 | float
|
---|
7 | 10 | margin-left:-200px; overflow:hidden;
|
---|
8 | | PASS
|
---|
| 11 | FAIL:
|
---|
| 12 | Expected 500 for width, but got 700.
|
---|
| 13 |
|
---|
| 14 | <div class="box" style="overflow: hidden" data-expected-width="500">margin-left:-200px; overflow:hidden;</div>
|
---|
9 | 15 | float
|
---|
10 | 16 | margin-left:0; overflow:auto;
|
---|
11 | 17 | PASS
|
---|
|
14 | 20 | PASS
|
---|
15 | 21 | float
|
---|
16 | 22 | 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
|
---|
17 | | PASS
|
---|
| 23 | FAIL:
|
---|
| 24 | Expected 500 for width, but got 700.
|
---|
| 25 |
|
---|
| 26 | <div class="box" style="overflow: visible; display: table" data-expected-width="500">
|
---|
| 27 | margin-left:-200px; display:table;
|
---|
| 28 | blah blah blah blah blah blah blah blah blah blah blah blah blah blah
|
---|
| 29 | blah blah blah blah blah blah blah blah blah blah blah blah blah blah
|
---|
| 30 | blah blah blah blah blah blah blah blah blah blah blah blah blah blah
|
---|
| 31 | </div>
|
---|