containing-block-028

Principal block box establishes the containing block

WeasyPrint

This browser

Assertion
Principal block boxes establish a containing block for descendant boxes.

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: Principal block box establishes the containing block</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#block-boxes">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Principal block boxes establish a containing block for descendant boxes.">
 9         <style type="text/css">
10             div
11             {
12                 background: blue;
13                 height: 1in;
14                 position: absolute;
15                 width: 1in;
16             }
17             div div
18             {
19                 background: orange;
20                 bottom: 0;
21                 height: 0.25in;
22                 right: 0;
23                 width: 0.25in;
24             }
25         </style>
26     </head>
27     <body>
28         <p>Test passes if the orange box is in the bottom right corner of the blue box.</p>
29         <div>
30             <div></div>
31         </div>
32     </body>
33 </html>