inherited-value-002.xht (1491B)
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: Inheriting computed values</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html" /> 7 <link rel="help" href="http://www.w3.org/TR/css-cascade-3/" /> 8 <link rel="help" href="http://www.w3.org/TR/css-cascade-4/" /> 9 <meta name="flags" content="ahem" /> 10 <meta name="assert" content="The computed value of a font-size with a percentage is the percentage of its parent's font-size value. A nested element which also has a percentage applies the parents' specified value (which is inherited)." /> 11 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 12 <style type="text/css"> 13 .container 14 { 15 font-family: Ahem; 16 font-size: 96px; 17 } 18 div div 19 { 20 background: blue; 21 height: 48px; 22 width: 48px; 23 } 24 div p 25 { 26 font-size: 50%; 27 } 28 </style> 29 </head> 30 <body> 31 <p>Test passes if the black box and the blue box are the same width.</p> 32 <div class="container"> 33 <p>X</p> 34 <div></div> 35 </div> 36 </body> 37 </html>