OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <p>There should be a smaller hotpink square below a larger blue |
| 3 square. They should not overlap.</p> |
| 4 <div style="position:relative; width:100px;"> |
| 5 <span id="inlineBlock" style="display:inline-block; width:40px; height:10px;
"></span> |
| 6 <div id="onLine" style="float:left; width:40px; height:40px;"></div> |
| 7 <div id="largeBelow" style="float:left; width:100px; height:100px; backgroun
d:blue;"></div> |
| 8 <div id="smallBelow" style="float:left; width:40px; height:40px; background:
hotpink;"></div> |
| 9 </div> |
| 10 <div style="clear:both;"></div> |
| 11 <script src="../../../resources/testharness.js"></script> |
| 12 <script src="../../../resources/testharnessreport.js"></script> |
| 13 <script> |
| 14 test(() => { |
| 15 var inlineBlock = document.getElementById("inlineBlock"); |
| 16 var onLine = document.getElementById("onLine"); |
| 17 var largeBelow = document.getElementById("largeBelow"); |
| 18 var smallBelow = document.getElementById("smallBelow"); |
| 19 assert_equals(inlineBlock.offsetLeft, 40); |
| 20 assert_equals(onLine.offsetLeft, 0); |
| 21 assert_equals(onLine.offsetTop, 0); |
| 22 assert_equals(largeBelow.offsetLeft, 0); |
| 23 assert_equals(largeBelow.offsetTop, 40); |
| 24 assert_equals(smallBelow.offsetLeft, 0); |
| 25 assert_equals(smallBelow.offsetTop, 140); |
| 26 }, "Large and smaller float pushed below line with float"); |
| 27 </script> |
OLD | NEW |