| <!DOCTYPE HTML> |
| <style> |
| body { |
| margin: 0; |
| } |
| #container { |
| position: absolute; |
| top: 0px; |
| bottom: 0px; |
| left: 0px; |
| right: 0px; |
| overflow: hidden; |
| } |
| #test { |
| position: absolute; |
| top: 300px; |
| bottom: 500px; |
| left: 140px; |
| right: 540px; |
| overflow: hidden; |
| } |
| .contents { |
| display: inline-block; |
| background-color: green; |
| height: 100px; |
| width: 100px; |
| overflow: hidden; |
| } |
| </style> |
| <script> |
| |
| function addChildren(test) |
| { |
| for (i = 0; i < 20; i++) { |
| box = document.createElement("div"); |
| box.setAttribute('class', 'contents'); |
| box.setAttribute('id', i); |
| test.appendChild(box); |
| } |
| } |
| |
| function runTest() |
| { |
| test = document.getElementById("test"); |
| addChildren(test); |
| |
| document.body.offsetTop; |
| } |
| window.onload = runTest; |
| </script> |
| <div id="top"> |
| <div id="container"> |
| <div id="test"></div> |
| </div> |
| </div> |
| Tests positioned movement layout when its height has changed. |