inline-formatting-context-011.xht (1642B)
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 and alignment of inline boxes</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-04-02 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#inline-formatting" /> 8 <link rel="match" href="inline-formatting-context-011-ref.xht" /> 9 10 <meta name="flags" content="ahem" /> 11 <meta name="assert" content="The 'vertical-align' property determines the vertical alignment of a box within a line box." /> 12 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 13 <style type="text/css"> 14 div 15 { 16 border-top: solid orange; 17 } 18 span 19 { 20 border: 20px solid blue; 21 display: inline-block; 22 font: 50px Ahem; 23 } 24 #span1 25 { 26 color: blue; 27 line-height: 1em; 28 } 29 #span2 30 { 31 line-height: 10px; 32 vertical-align: top; 33 } 34 </style> 35 </head> 36 <body> 37 <p>Test passes if the black square and blue rectangles touch the orange line.</p> 38 <div> 39 <span id="span1">X</span> 40 <span id="span2">X</span> 41 </div> 42 </body> 43 </html>