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: Percentage 'min-height' with no 'height' on containing block</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#min-max-heights">
7 <meta name="flags" content="">
8 <meta name="assert" content="When the 'height' of the containing block is not specified and the element is not absolutely positioned the percentage is treated as '0' for 'min-height' and 'none' for 'max-height'.">
9 <style type="text/css">
10 div
11 {
12 width: 1in;
13 }
14 #div1
15 {
16 position: relative;
17 }
18 div div
19 {
20 background: red;
21 min-height: 50%;
22 }
23 </style>
24 </head>
25 <body>
26 <p>Test passes if there is no red visible on the page.</p>
27 <div id="div1">
28 <div></div>
29 </div>
30 </body>
31 </html>