blob: d2fb110350b6fd0784e960ad16722e0b84495c2a [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>CSS Test: Absolutely positioned, non-replaced elements, over-constrained</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/">
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height">
<meta name="flags" content="">
<meta name="assert" content="The 'bottom' value is ignored and the equation solves for the bottom value, when the values for 'top', 'bottom', 'height', 'margin-top', 'margin-bottom' add up to more than the containing blocks height.">
<style type="text/css">
#div1
{
border: 10px solid black;
height: 300px;
position: relative;
width: 300px;
overflow: auto;
}
div div
{
background: blue;
height: 150px;
margin-bottom: 50px;
margin-top: 50px;
position: absolute;
top: 50px;
width: 50%;
}
#div2
{
bottom: 50px;
}
#div3
{
bottom: 0;
left: 50%;
}
</style>
</head>
<body>
<p>Test passes if there is one blue box on the page.</p>
<div id="div1">
<div id="div2"></div>
<div id="div3"></div>
</div>
</body>
</html>