line-height-121.xht (1650B)
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: The 'line-height' property</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-04-04 --> 7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/fonts/line-height/001.html" type="text/html"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#line-height" /> 9 <link rel="match" href="line-height-121-ref.xht" /> 10 11 <meta name="flags" content="ahem" /> 12 13 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 14 <style type="text/css"> 15 .container { background: red; height: 1.25em; width: 7.5em; } 16 .test { font: 2.5em/0 Ahem; background: green; color: green; } 17 .test { line-height: 1; } /* should override previous line */ 18 </style> 19 </head> 20 <body> 21 <p>Test passes if there is a short green rectangle and <strong>no red</strong>.</p> 22 <div class="container"><div class="test">ppp</div></div> 23 24 <!-- "p" is like an underscore in Ahem. --> 25 26 <!-- the result will be that if the line-height is 0, then the 27 container will be visible as the test will be height:0 and the 28 text will overflow the test with a small green line, leaving 29 the red of the container visible. otherwise, line-height is 30 1, the test block will grow to be bigger than the 31 container, overflowing it, and hiding the red. --> 32 33 <!-- see ../001.html --> 34 35 </body> 36 </html>