table-cell-001.xht (1357B)
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: Table-cell</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-display" /> 7 <link rel="match" href="../reference/ref-filled-black-96px-square.xht" /> 8 <meta name="assert" content="An element with 'display: table-cell' is rendered as if it were a table cell." /> 9 <style type="text/css"> 10 .table 11 { 12 display: table; 13 } 14 .tr 15 { 16 display: table-row; 17 } 18 .td 19 { 20 background: black; 21 display: table-cell; 22 height: 48px; 23 width: 48px; 24 } 25 </style> 26 </head> 27 <body> 28 <p>Test passes if there is a filled black square.</p> 29 <div class="table"> 30 <div class="tr"> 31 <div class="td"></div> 32 <div class="td"></div> 33 </div> 34 <div class="tr"> 35 <div class="td"></div> 36 <div class="td"></div> 37 </div> 38 </div> 39 </body> 40 </html>