containing-block-021

Containing Blocks - Block-level elements position based on left-to-right direction and parent element is fixed

WeasyPrint

This browser

Assertion
The containing block is formed by the padding edge for block-level elements.

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: Containing Blocks - Block-level elements position based on left-to-right direction and parent element is fixed</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#containing-block-details">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="The containing block is formed by the padding edge for block-level elements.">
 9         <style type="text/css">
10             div
11             {
12                 border: solid black;
13                 padding: 1in;
14                 position: fixed;
15                 width: 0;
16             }
17             span
18             {
19                 display: block;
20             }
21             #span1
22             {
23                 direction: ltr;
24             }
25             span span
26             {
27                 background: blue;
28                 height: 1in;
29                 position: absolute;
30                 width: 1in;
31             }
32         </style>
33     </head>
34     <body>
35         <p>Test passes if the blue box is in the lower-right corner of the black box.</p>
36         <div>
37             <span id="span1">
38                 <span></span>
39             </span>
40         </div>
41     </body>
42 </html>