blob: 3a0c4d64a3825f53343fb4514669b60c1350e472 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<!-- This tests that a block inside nested inlines respects the positioning of a parent when it gets relatively positioned. -->
<head>
<title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
<style type="text/css">
#div1
{
background: yellow;
height: 2in;
position: relative;
width: 2in;
}
#div2
{
background: blue;
display: inline;
position: relative;
top: 2in;
}
#div3
{
background: orange;
width: 2in;
}
#div4
{
background: blue;
display: inline;
top: 2in;
}
</style>
<script type="text/javascript">
if (window.testRunner) {
testRunner.waitUntilDone();
}
function run() {
document.getElementById("div4").style.position = "relative";
document.body.offsetTop;
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body onload="setTimeout('run()', 10);">
<p>Test passes if each of the orange boxes is sandwiched between two blue boxes and all blue and orange boxes are below the big yellow box.</p>
<div id="div1">
<div id="div2">
Filler Text
<div id="div3">Filler Text</div>
<div id="div4">
Filler Text
<div id="div3">Filler Text</div>
Filler Text
</div>
<div id="div3">Filler Text</div>
Filler Text
</div>
</div>
</body>
</html>