1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <title>CSS Test: Absolutely positioned, non-replaced elements, over-constrained</title>
5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
6 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height">
7 <meta name="flags" content="">
8 <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.">
9 <style type="text/css">
10 #div1
11 {
12 border: 10px solid black;
13 height: 300px;
14 position: relative;
15 width: 300px;
16 overflow: auto;
17 }
18 div div
19 {
20 background: blue;
21 height: 150px;
22 margin-bottom: 50px;
23 margin-top: 50px;
24 position: absolute;
25 top: 50px;
26 width: 50%;
27 }
28 #div2
29 {
30 bottom: 50px;
31 }
32 #div3
33 {
34 bottom: 0;
35 left: 50%;
36 }
37 </style>
38 </head>
39 <body>
40 <p>Test passes if there is one blue box on the page.</p>
41 <div id="div1">
42 <div id="div2"></div>
43 <div id="div3"></div>
44 </div>
45 </body>
46 </html>