9458-valign-2.html (1380B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS 2.1 Test Suite: Test for vertical alignment on inline-block</title> 5 <link rel="author" title="L. David Baron" href="https://dbaron.org/" /> 6 <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#display-prop" /> 8 <meta name="assert" content="This value causes an element to generate a block box, which itself is flowed as a single inline box, similar to a replaced element. The inside of an inline-block is formatted as a block box, and the element itself is formatted as an inline replaced element." /> 9 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading" /> 10 <meta name="assert" content="The baseline of an 'inline-block' is the baseline of its last line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow' property has a computed value other than 'visible', in which case the baseline is the bottom margin edge." /> 11 <meta name="flags" content="" /> 12 <style type="text/css"> 13 body { background: white; color: black; } 14 span { display: inline-block; margin: 3px 0; border: 4px solid white; border-width: 4px 0; padding: 9px 0; } 15 span > span { display: block; visibility: hidden; } 16 </style> 17 </head> 18 <body> 19 <table border><tr><td> 20 <p>a<span><span>x</span>bcd</span>e</p> 21 </td></tr></table> 22 </body> 23 </html>