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: Height determination for block-level non-replaced elements in normal flow when 'overflow' does not compute to 'visible' and elements' margins do not collapse</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="When a block-level non-replaced element is in normal flow, 'overflow' does not compute to 'visible', the 'height' is 'auto' and top and bottom margins do not collapse. The 'height' is the sized from the top of the topmost margin edge of the content to the bottom of the bottom most margin edge of the content.">
9 <style type="text/css">
10 html, body
11 {
12 overflow: scroll;
13 }
14 #div1
15 {
16 position: relative;
17 }
18 #div2
19 {
20 background: blue;
21 border-bottom: 0.25in solid blue;
22 border-top: 0.25in solid blue;
23 }
24 #div2, #div3, #div4, #div5
25 {
26 width: 1in;
27 }
28 #div3, #div4
29 {
30 background: blue;
31 height: 0.25in;
32 }
33 #div3
34 {
35 border-top: 0.25in solid blue;
36 margin-top: 0.25in;
37 }
38 #div4
39 {
40 border-bottom: 0.25in solid blue;
41 margin-bottom: 0.25in;
42 }
43 #div5
44 {
45 background: blue;
46 height: 2in;
47 left: 1in;
48 position: absolute;
49 top: 0;
50 }
51 </style>
52 </head>
53 <body>
54 <p>Test passes if there is a blue square below.</p>
55 <div id="div1">
56 <div id="div2">
57 <div id="div3"></div>
58 <div id="div4"></div>
59 </div>
60 <div id="div5"></div>
61 </div>
62 </body>
63 </html>