table-height-algorithm-002.xht (2214B)
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: Specified table height is treated as minimum height</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 specified table height value is treated as the minimum height of the table." /> 9 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 10 <style type="text/css"> 11 #reference 12 { 13 background: black; 14 font: 16px/1em Ahem; 15 height: 10em; 16 width: 20em; 17 } 18 table 19 { 20 border-spacing: 0; 21 padding: 0; 22 } 23 .t1 24 { 25 height: 4em; 26 background: blue; 27 color: blue; 28 } 29 .t2 30 { 31 height: 5em; 32 background: purple; 33 color: purple; 34 } 35 td 36 { 37 padding: 0; 38 } 39 </style> 40 </head> 41 <body> 42 <p>Test passes if the blue and purple boxes below are half the height of the black box.</p> 43 <div id="reference"> 44 <table class="t1"> 45 <tr> 46 <td>XXXXXXXXXX</td> 47 </tr> 48 <tr> 49 <td>XXXXXXXXXX</td> 50 </tr> 51 <tr> 52 <td>XXXXXXXXXX</td> 53 </tr> 54 <tr> 55 <td>XXXXXXXXXX</td> 56 </tr> 57 <tr> 58 <td>XXXXXXXXXX</td> 59 </tr> 60 </table> 61 <table class="t2"> 62 <tr> 63 <td>XXXXXXXXXX</td> 64 </tr> 65 <tr> 66 <td>XXXXXXXXXX</td> 67 </tr> 68 </table> 69 </div> 70 </body> 71 </html>