vertical-align-baseline-005

Vertical-align applied to an 'inline-block' with 'overflow' not set to 'visible' and baseline alignment

WeasyPrint

This browser

Flags
ahem
Assertion
The 'vertical-align' property aligns an 'inline-block' elements' bottom margin edge with the baseline when 'overflow' is not set to 'visible'.

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 an 'inline-block' with 'overflow' not set to 'visible' 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="ahem">
 9         <meta name="assert" content="The 'vertical-align' property aligns an 'inline-block' elements' bottom margin edge with the baseline when 'overflow' is not set to 'visible'.">
10         <style type="text/css">
11             div
12             {
13                 font: 20px/1em Ahem;
14             }
15             #span1
16             {
17                 background: blue;
18                 color: blue;
19             }
20             #span2
21             {
22                 color: orange;
23                 display: inline-block;
24                 margin-bottom: 1em;
25                 height: 4em;
26                 overflow: hidden;
27                 width: 5em;
28             }
29         </style>
30     </head>
31     <body>
32         <p>Test passes if the orange box below is above the blue box.</p>
33         <div>
34             <span id="span1">X<span id="span2">XXXXX XXXXX XXXXX XXXXX XXXXX</span>X</span>
35         </div>
36     </body>
37 </html>