line-height-035

Line-height using centimeters with a minimum value, 0cm

WeasyPrint

This browser

Flags
ahem
Assertion
The 'line-height' property sets a minimum length value in centimeters.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3     <head>
 4         <title>CSS Test: Line-height using centimeters with a minimum value, 0cm</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         <meta name="flags" content="ahem">
 9         <meta name="assert" content="The 'line-height' property sets a minimum length value in centimeters.">
10         <style type="text/css">
11             div
12             {
13                 font: 20px/1 Ahem;
14                 position: relative;
15                 width: 1em;
16             }
17             #div2, #div3
18             {
19                 background: black;
20             }
21             #div2
22             {
23                 line-height: 0cm;
24             }
25             #div3
26             {
27                 height: 1em;
28                 left: 1.1em;
29                 position: absolute;
30                 top: -0.5em;
31             }
32         </style>
33     </head>
34     <body>
35         <p>Test passes if the two boxes below are the same height.</p>
36         <div id="div1">
37             <div id="div2">X X</div>
38             <div id="div3"></div>
39         </div>
40     </body>
41 </html>