vertical-align-baseline-003

Vertical-align applied to 'inline-block' and baseline alignment

WeasyPrint

This browser

Assertion
The 'vertical-align' property aligns the last line box of 'inline-block' elements with the baseline.

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: Vertical-align applied to 'inline-block' and baseline alignment</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-vertical-align">
 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 'vertical-align' property aligns the last line box of 'inline-block' elements with the baseline.">
10         <style type="text/css">
11             #span1
12             {
13                 font-size: 16px;
14             }
15             #span2
16             {
17                 background: orange;
18                 display: inline-block;
19                 width: 5em;
20             }
21         </style>
22     </head>
23     <body>
24         <p>Test passes if the last line of "Filler Text" inside the orange box below is on the same line as the arrows "--&gt;" "&lt;--".</p>
25         <div>
26             <span id="span1">--&gt; <span id="span2">Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text</span> &lt;--</span>
27         </div>
28     </body>
29 </html>