| <html> |
| <body onload="runTest()"> |
| <div style="width: 20px;"> |
| <script> |
| function runTest() |
| { |
| document.body.offsetTop; |
| var container = document.getElementById('panel'); |
| container.style.position = 'relative'; |
| document.getElementById('test1').style.position = 'absolute'; |
| document.getElementById('test2').style.position = 'absolute'; |
| } |
| </script> |
| <div id="panel"> |
| <div id="test1"> |
| <img style="float: left; width: 20px; height: 100px; background-color: silver;"> |
| </div> |
| <div id="test2" style="font-family: Ahem;"> |
| <a><p>A B C D</p> |
| </div> |
| </div> |
| </div> |
| </body> |
| </html> |