line-height-080.xht (1599B)
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 'ex' units with a minimum plus one value, 1ex</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-025-ref.xht" /> 9 10 <meta name="flags" content="ahem" /> 11 <meta name="assert" content="The 'line-height' property sets a minimum plus one length value in 'ex' units." /> 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 position: relative; 18 width: 1em; 19 } 20 #div2, #div3 21 { 22 background: black; 23 } 24 #div2 25 { 26 line-height: 1ex; 27 } 28 #div3 29 { 30 height: 36px; 31 left: 1.1em; 32 position: absolute; 33 top: -2px; 34 } 35 </style> 36 </head> 37 <body> 38 <p>Test passes if the 2 vertical black stripes have the <strong>same height</strong>.</p> 39 <div id="div1"> 40 <div id="div2">X X</div> 41 <div id="div3"></div> 42 </div> 43 </body> 44 </html>