position-absolute-005

Absolutely positioned elements do not establish a new containing block for fixed position descendants

WeasyPrint

This browser

Assertion
An absolutely positioned box does not establish a new containing block for fixed positioned descendants.

Source

 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 elements do not establish a new containing block for fixed position descendants</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#absolute-positioning">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="An absolutely positioned box does not establish a new containing block for fixed positioned descendants.">
 9         <style type="text/css">
10             p
11             {
12                 margin-top: 1in;
13             }
14             #div1
15             {
16                 position: relative;
17             }
18             #div2
19             {
20                 position: absolute;
21                 height: 1in;
22                 left: 3in;
23                 top: 3in;
24                 width: 1in;
25             }
26             #div3
27             {
28                 background: black;
29                 height: 1in;
30                 left: 0;
31                 position: fixed;
32                 top: 0;
33                 width: 1in;
34             }
35         </style>
36     </head>
37     <body>
38         <p>Test passes if there is a box in the upper-left corner of the page.</p>
39         <div id="div1">
40             <div id="div2">
41                 <div id="div3"></div>
42             </div>
43         </div>
44     </body>
45 </html>