50 lines
1.6 KiB
HTML
50 lines
1.6 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<!-- This tests that changing the style of a parent block does not clobber the positioning of any anonymous block
|
|
children that hold the descendants of a relative positioned inline. -->
|
|
<head>
|
|
<title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
|
|
<style type="text/css">
|
|
#span2
|
|
{
|
|
background: blue;
|
|
display: inline;
|
|
width: 2in;
|
|
left: 2in;
|
|
top: 2in;
|
|
position: relative;
|
|
}
|
|
#div3
|
|
{
|
|
background: orange;
|
|
width: 2in;
|
|
}
|
|
#div4
|
|
{
|
|
background: orange;
|
|
width: 2in;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
if (window.testRunner) {
|
|
testRunner.waitUntilDone();
|
|
}
|
|
|
|
function run() {
|
|
document.getElementById("div3").style.background = "red";
|
|
document.body.offsetTop;
|
|
if (window.testRunner)
|
|
testRunner.notifyDone();
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="setTimeout('run()', 10);">
|
|
<p>Test passes if the blue box sits atop the orange box and both are in the center of the view.</p>
|
|
<div id="div3">
|
|
<span id="span2">
|
|
Filler Text1
|
|
<div id="div4">Filler Text</div>
|
|
</span>
|
|
</div>
|
|
</body>
|
|
</html> |