containing-block-percent-margin-left.html (718B)
1 <!DOCTYPE html> 2 <link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> 3 <link rel="help" href="https://www.w3.org/TR/CSS22/box.html#propdef-margin-left"> 4 <style> 5 #container > div { margin-left:50%; height:100px; background:blue; } 6 </style> 7 <p>There should be a blue square below.</p> 8 <div id="container" style="width:456px;"> 9 <div data-expected-width="100" data-expected-height="100"></div> 10 </div> 11 <script src="/resources/testharness.js"></script> 12 <script src="/resources/testharnessreport.js"></script> 13 <script src="/resources/check-layout-th.js"></script> 14 <script> 15 document.body.offsetTop; 16 document.getElementById("container").style.width = "200px"; 17 checkLayout("#container"); 18 </script>