vertical-align-baseline-006a.xht (1232B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 5 <head> 6 7 <title>CSS Test: Baseline alignment of an inline-block with vertical padding and margin</title> 8 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> 10 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#leading" title="10.8.1 Leading and half-leading" /> 11 12 <meta name="assert" content="The baseline of an (anonymous) inline element is aligned with the baseline of the last line box of an 'inline-block' in the normal flow as 'vertical-align: baseline' is by default applied. In such case, the vertical padding and vertical margin have no influence on the position of the baseline line of an 'inline-block'." /> 13 14 <style type="text/css"><![CDATA[ 15 div > div 16 { 17 display: inline-block; 18 font-size: 30px; 19 margin: 0.3em 0em; 20 padding: 0.7em 0em; 21 vertical-align: baseline; 22 } 23 ]]></style> 24 25 </head> 26 27 <body> 28 29 <p>Test passes if the bottom of all 'L's are aligned.</p> 30 31 <div>LLLLL 32 <div> 33 <p>ABCDE</p> 34 <p>LLLLL</p> 35 </div>LLLLL 36 </div> 37 38 </body> 39 </html>