containing-block-029

Principal block box establishes the containing block for generated content

WeasyPrint

This browser

Assertion
Principal block boxes establish a containing block for generated content.

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 for generated content</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 generated content.">
 9         <style type="text/css">
10             div
11             {
12                 background: blue;
13                 height: 1in;
14                 position: absolute;
15                 width: 1in;
16             }
17             div div:before
18             {
19                 content: ".";
20                 background: orange;
21                 bottom: 0;
22                 display: block;
23                 height: 0.25in;
24                 position: absolute;
25                 right: 0;
26                 width: 0.25in;
27             }
28         </style>
29     </head>
30     <body>
31         <p>Test passes if the orange box is in the bottom right corner of the blue box.</p>
32         <div>
33             <div></div>
34         </div>
35     </body>
36 </html>