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: Inline-block non-replaced element with 'margin-top', margin-bottom' set to 'auto' and 'height' relying on the descendants</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#block-root-margin">
7 <meta name="flags" content="">
8 <meta name="assert" content="If 'height' is 'auto' on an inline-block non-replaced element then the 'height' depends on the descendants.">
9 <style type="text/css">
10 #div1
11 {
12 position: relative;
13 }
14 #div2
15 {
16 background: blue;
17 display: inline-block;
18 }
19 #div2 div, #div3
20 {
21 height: 1in;
22 width: 1in;
23 }
24 #div3
25 {
26 background: orange;
27 left: 1in;
28 position: absolute;
29 top: 0;
30 }
31 </style>
32 </head>
33 <body>
34 <p>Test passes if the blue and orange boxes below are the same height.</p>
35 <div id="div1">
36 <div id="div2">
37 <div></div>
38 </div>
39 <div id="div3"></div>
40 </div>
41 </body>
42 </html>