block-formatting-context-height-003

Block formatting context auto height with floated descendants outside the normal flow and bottom margins

WeasyPrint

This browser

Assertion
The auto height of a block formatting context element does not account for bottom margins of floated content descendents of out of flow blocks.

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: Block formatting context auto height with floated descendants outside the normal flow and bottom margins</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#root-height">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="The auto height of a block formatting context element does not account for bottom margins of floated content descendents of out of flow blocks.">
 9         <style type="text/css">
10             #container
11             {
12                 width: 100px;
13                 height: auto;
14                 background: black;
15                 position: absolute;
16             }
17             #sibling
18             {
19                 height: 50px;
20                 width: 100px;
21             }
22             #absolute
23             {
24                 position: absolute;
25                 width: 100px;
26                 height: 50px;
27             }
28             #float
29             {
30                 margin-bottom: 50px;
31                 height: 50px;
32                 width: 100%; 
33             }
34         </style>
35     </head>
36     <body>
37         <p>Test passes if a the box below is wider than it is tall.</p>
38         <div id="container">
39             <div id="sibling"></div>
40             <div id="absolute">
41                 <div id="float"></div>
42             </div>
43         </div>
44     </body>
45 </html>