table-height-algorithm-028.xht (1473B)
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: Baseline of a cell might end up below its bottom border</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#height-layout" /> 7 <meta name="flags" content="ahem may" /> 8 <meta name="assert" content="The baseline of a cell may end up below its bottom border (modified example from spec section 17.5.3)." /> 9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 10 <style type="text/css"> 11 table 12 { 13 height: 100px; 14 } 15 td 16 { 17 font: 20px/1em Ahem; 18 vertical-align: baseline; 19 } 20 #cell 21 { 22 color: blue; 23 } 24 div 25 { 26 height: 0; 27 } 28 </style> 29 </head> 30 <body> 31 <p>Test passes regardless if the black box is closer to the top of the page than the blue box, or it is not.</p> 32 <table> 33 <tr> 34 <td id="cell"> 35 <div>Test</div> 36 XXXXXXXXXX 37 </td> 38 <td>XXXXXXXXXX</td> 39 </tr> 40 </table> 41 </body> 42 </html>