numbers-units-015.xht (1598B)
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: Height of EX</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units" /> 7 <link rel="help" href="https://www.w3.org/TR/css-values-3/#font-relative-lengths" /> 8 <link rel="match" href="numbers-units-015-ref-a.xht"/> 9 <link rel="match" href="numbers-units-015-ref-b.xht"/> 10 <meta name="flags" content="ahem should" /> 11 <meta name="assert" content="In the cases where it is impossible or impractical to determine the x-height, a value of 0.5em should be used." /> 12 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 13 <style type="text/css"> 14 #test 15 { 16 height: 1ex; 17 width: 1ex; 18 } 19 #div1 20 { 21 height: 0.5em; 22 width: 0.5em; 23 } 24 #div2 25 { 26 height: 0.8em; 27 width: 0.8em; 28 } 29 div 30 { 31 background: black; 32 font-family: Ahem; 33 margin-top: 2px; 34 } 35 </style> 36 </head> 37 <body> 38 <p>Test passes if any two of the boxes below are the same size.</p> 39 <div id="test"></div> 40 <div id="div1"></div> 41 <div id="div2"></div> 42 </body> 43 </html>