line-height-036.xht (1646B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Line-height using centimeters with a minimum plus one value, 1cm</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-04-04 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#propdef-line-height" /> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading" /> 9 <meta name="flags" content="ahem" /> 10 <meta name="assert" content="The 'line-height' property sets a minimum plus one length value in centimeters." /> 11 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 12 <style type="text/css"> 13 div 14 { 15 font: 20px/1 Ahem; 16 position: relative; 17 width: 1em; 18 } 19 #div2, #div3 20 { 21 background: black; 22 } 23 #div2 24 { 25 line-height: 1cm; 26 } 27 #div3 28 { 29 height: 1cm; 30 left: 1.1em; 31 position: absolute; 32 top: 0; 33 } 34 </style> 35 </head> 36 <body> 37 <p>Test passes if the two boxes below are the same height.</p> 38 <div id="div1"> 39 <div id="div2">X</div> 40 <div id="div3"></div> 41 </div> 42 </body> 43 </html>