numbers-units-013.xht (1715B)
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: Em size with font-size set to percentage</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-013-ref.xht"/> 9 <meta name="flags" content="ahem" /> 10 <meta name="assert" content="The 'em' unit is equal to the computed value of the 'font-size' property of the element on which it is used." /> 11 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 12 <style type="text/css"> 13 #parent 14 { 15 font: 20px/1 Ahem; 16 } 17 #div1 18 { 19 font-size: 500%; 20 } 21 #test 22 { 23 background: black; 24 height: 1em; 25 width: 1em; 26 } 27 div 28 { 29 margin-top: 5px; 30 } 31 #reference 32 { 33 background: black; 34 height: 100px; 35 width: 100px; 36 } 37 </style> 38 </head> 39 <body> 40 <p>Test passes if the three boxes below are the same size.</p> 41 <div id="parent"> 42 <div id="div1"> 43 <div id="test"></div> 44 <div>X</div> 45 <div id="reference"></div> 46 </div> 47 </div> 48 </body> 49 </html>