height-computed-001.xht (1570B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 5 <head> 6 <title>CSS min-height: min-height does not influence the computed height</title> 7 8 <link rel="help" href="http://www.w3.org/TR/CSS22/visudet.html#min-max-heights" title="10.7 Minimum and maximum heights: 'min-height' and 'max-height'" /> 9 <link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.10.7" title="C.1 Changes since the Recommendation of 7 June 2011" /> 10 <meta name="assert" content="If the resulting height is smaller than 'min-height', the rules above are applied again, but this time using the value of 'min-height' as the computed value for 'height'. Note: These steps do not affect the real computed value of 'height'." /> 11 <link rel="match" href="height-computed-001-ref.xht" /> 12 <link rel="author" title="Bert Bos" href="mailto:bert@w3.org" /> 13 14 15 <style type="text/css"><![CDATA[ 16 body {background: white; color: black; font-size: 14px} 17 span {display: inline-block} 18 #container {background: green; height: 70px; min-height: 140px} 19 #child1 {background: #66F; width: 70px; height: inherit} /* Inherits 70px */ 20 #child2 {background: #AAF; width: 70px; height: 70px} 21 ]]></style> 22 </head> 23 24 <body> 25 <p>Test passes if (1) the two blue rectangles have the same height 26 and (2) that height is about the same as the green rectangle.</p> 27 28 <p> 29 <span id="container"> 30 <span id="child1"></span><span id="child2"></span> 31 </span> 32 </p> 33 </body> 34 </html>