containing-block-020

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

WeasyPrint

This browser

Assertion
The contining 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 right-to-left direction and parent element is absolute</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 contining 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: absolute;
15                 width: 0;
16             }
17             span
18             {
19                 display: block;
20             }
21             #span1
22             {
23                 direction: rtl;
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-left corner of the black box.</p>
36         <div>
37             <span id="span1">
38                 <span></span>
39             </span>
40         </div>
41     </body>
42 </html>