fr-unit-ref.html (1147B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>CSS3 Grid Layout: Reference File</title> 5 <link rel="author" title="swain" href="mailto:swainet@126.com"/> 6 <link rel="reviewer" title="Dayang Shen" href="mailto:shendayang@baidu.com"/> <!-- 2013-09-22 --> 7 <style type="text/css"> 8 #container { 9 position:relative; 10 width:400px; 11 height:100px; 12 } 13 14 .error { 15 position:absolute; 16 top:0; 17 left:0; 18 height:100%; 19 width:100%; 20 z-index:-1; 21 } 22 23 #table { 24 width:100%; 25 height:100%; 26 border-collapse:collapse; 27 } 28 29 #table td { 30 padding:0; 31 vertical-align:top; 32 } 33 34 #table td:first-child { 35 width:100px; 36 } 37 38 #table tr:first-child td { 39 height:30px; 40 } 41 </style> 42 </head> 43 <body> 44 <p>Test passes if there is a green square and no red.</p> 45 46 <div id="container"> 47 <div class="error"> 48 <table id="table"> 49 <tbody> 50 <tr> 51 <td>cell1</td> 52 <td>cell2</td> 53 </tr> 54 <tr> 55 <td>cell3</td> 56 <td style="background-color:green">cell4</td> 57 </tr> 58 </tbody> 59 </table> 60 </div> 61 </div> 62 </body> 63 </html>