| <!DOCTYPE html> |
| <style> |
| #container { |
| width: 100px; |
| } |
| |
| .float { |
| float: right; |
| height: 50px; |
| width: 100%; |
| background: green; |
| } |
| |
| #clear { |
| clear: both; |
| height: 1px; |
| } |
| |
| #next { |
| margin-top: -50px; |
| line-height: 0; |
| } |
| |
| span { |
| display: inline-block; |
| width: 100%; |
| height: 50px; |
| background: green; |
| } |
| </style> |
| <p>crbug.com/591243: Clear floats when we have negative margin and are separated from the float by a div that doesn't track it.</p> |
| <div id="container" data-expected-height=100> |
| <div class="float"></div> |
| <div id="clear"></div> |
| <div id="next"> |
| <span></span> |
| </div> |
| </div> |
| <script src="../../../resources/check-layout.js"></script> |
| <script> |
| checkLayout("#container"); |
| </script> |
| |