block-non-replaced-height-004

Block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible' and 'height' is 'auto'

WeasyPrint

This browser

Assertion
The 'height' is the 'height' of the child block box when a block-level non-replaced element is in normal flow and 'overflow' does not compute to 'visible'.

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-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible' and 'height' is 'auto'</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#normal-block">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="The 'height' is the 'height' of the child block box when a block-level non-replaced element is in normal flow and 'overflow' does not compute to 'visible'.">
 9         <style type="text/css">
10             html, body
11             {
12                 overflow: scroll;
13             }
14             div
15             {
16                 position: relative;
17             }
18             div div
19             {
20                 width: 1in;
21             }
22             #div1 div
23             {
24                 background: blue;
25                 height: 2in;
26             }
27             #div2
28             {
29                 background: orange;
30                 height: 2in;
31                 left: 1in;
32                 position: absolute;
33                 top: 0;
34             }
35         </style>
36     </head>
37     <body>
38         <p>Test passes if the blue and orange boxes below are the same height.</p>
39         <div>
40             <div id="div1">
41                 <div></div>
42             </div>
43             <div id="div2"></div>
44         </div>
45     </body>
46 </html>