line-height-applies-to-008

Line-height applied to elements with 'display' set to 'inline'

WeasyPrint

This browser

Assertion
The 'line-height' property applies to elements with 'display' set to 'inline'.

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 applied to elements with 'display' set to 'inline'</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="">
 9         <meta name="assert" content="The 'line-height' property applies to elements with 'display' set to 'inline'.">
10         <style type="text/css">
11             #div1
12             {
13                 background: blue;
14                 position: relative;
15                 width: 2in;
16             }
17             #div2
18             {
19                 display: inline;
20                 line-height: 1in;
21             }
22             #div3
23             {
24                 background: orange;
25                 height: 2in;
26                 left: 1in;
27                 position: absolute;
28                 top: 0;
29                 width: 1in;
30             }
31             .box
32             {
33                 background: blue;
34                 height: 0.5in;
35                 width: 1in;
36             }
37         </style>
38     </head>
39     <body>
40         <p>Test passes if the blue and orange boxes below are the same height.</p>
41         <div id="div1">
42             <div class="box"></div>
43             <div id="div2">&nbsp;</div>
44             <div class="box"></div>
45             <div id="div3"></div>
46         </div>
47     </body>
48 </html>