position-relative-005.html (732B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://crbug.com/1058690"> 3 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 4 <meta name="assert" content="A percent inset resolves against the available size when it dynamically changes."> 5 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 6 <div id="target" style="width: 100px; background: red; line-height: 0;"> 7 <span style="position: relative; top: -100%;"> 8 <span style="position: relative; top: 100px;"> 9 <div style="position: absolute; width: 100px; height: 100px; background: green;"></div> 10 </span> 11 </span> 12 </div> 13 <script> 14 document.body.offsetTop; 15 document.getElementById('target').style.height = '100px'; 16 </script>