vertical-align-baseline-004.xht (1560B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Vertical-align applied to empty '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 9 <meta name="flags" content="ahem" /> 10 <meta name="assert" content="The 'vertical-align' property aligns an empty 'inline-block' elements' bottom margin edge with the baseline." /> 11 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 12 <style type="text/css"> 13 div 14 { 15 background: black; 16 width: 3in; 17 } 18 #span1 19 { 20 color: white; 21 font: 1in/1em Ahem; 22 } 23 #span2 24 { 25 background: white; 26 display: inline-block; 27 height: 1in; 28 position: relative; 29 top: 0.2em; 30 width: 1in; 31 } 32 </style> 33 </head> 34 <body> 35 <p>Test passes if there are 2 parallel black bars of equal width.</p> 36 <div> 37 <span id="span1">X<span id="span2"></span>X</span> 38 </div> 39 <div id="reference">XXX</div> 40 </body> 41 </html>