table-visual-layout-013.xht (1581B)
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: A spanning cell must be as far to the left as possible in an 'ltr' table</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#table-layout" /> 7 <meta name="assert" content="The spanning cell's rectangle is as far to the left as possible, but to the right of all cells in the same row that were earlier in source (no overlapping)." /> 8 <style type="text/css"> 9 td 10 { 11 border: 1px solid black; 12 height: 100px; 13 width: 100px; 14 } 15 #cell 16 { 17 background: black; 18 } 19 .cell 20 { 21 background: blue; 22 } 23 </style> 24 </head> 25 <body> 26 <p>Test passes if the black square is to the right of both blue boxes on the page.</p> 27 <table> 28 <tr> 29 <td></td> 30 <td class="cell" rowspan="2"></td> 31 <td></td> 32 <td></td> 33 </tr> 34 <tr> 35 <td class="cell"></td> 36 <td id="cell" rowspan="2" colspan="2"></td> 37 </tr> 38 <tr> 39 <td></td> 40 </tr> 41 <tr> 42 <td></td> 43 </tr> 44 </table> 45 </body> 46 </html>