table-height-algorithm-030.xht (1594B)
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: Cell boxes smaller than their rows receive extra padding</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" /> 8 <meta name="assert" content="A cell box that is smaller than height of its row receives extra top or bottom padding." /> 9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 10 <style type="text/css"> 11 table 12 { 13 border-spacing: 0; 14 } 15 td 16 { 17 color: blue; 18 font: 16px/1em Ahem; 19 padding: 0; 20 vertical-align: middle; 21 } 22 #short 23 { 24 color: orange; 25 height: 1em; 26 } 27 </style> 28 </head> 29 <body> 30 <p>Test passes if there is orange box to the right of the blue box and the orange box is vertically aligned to the middle of the blue box.</p> 31 <table> 32 <tr> 33 <td> 34 XXXXX<br /> 35 XXXXX<br /> 36 XXXXX<br /> 37 XXXXX<br /> 38 XXXXX<br /> 39 </td> 40 <td id="short">XXXXX</td> 41 </tr> 42 </table> 43 </body> 44 </html>