line-height-112.xht (1634B)
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 with keyword value of 'inherit'</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#propdef-line-height" /> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading" /> 8 <link rel="match" href="line-height-006-ref.xht" /> 9 10 <meta name="flags" content="ahem" /> 11 <meta name="assert" content="The 'line-height' property set to 'inherit' uses the default line-height." /> 12 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 13 <style type="text/css"> 14 div 15 { 16 font: 20px/1 Ahem; 17 line-height: 1in; 18 position: relative; 19 width: 1em; 20 } 21 div div 22 { 23 background: black; 24 line-height: 1em; 25 } 26 #div2 27 { 28 line-height: inherit; 29 } 30 #div3 31 { 32 height: 1in; 33 left: 1.1em; 34 position: absolute; 35 top: 0; 36 } 37 </style> 38 </head> 39 <body> 40 <p>Test passes if the 2 black vertical stripes have the <strong>same height</strong>.</p> 41 <div id="div1"> 42 <div id="div2">X</div> 43 <div id="div3"></div> 44 </div> 45 </body> 46 </html>