fixed-table-layout-003e04.xht (1819B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 5 <head> 6 7 <title>CSS Test: table-layout: fixed - cell in the first row with specified width</title> 8 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> 10 <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#fixed-table-layout" /> 11 <link rel="bookmark" href="http://lists.w3.org/Archives/Public/www-style/2011Oct/0502.html" title="[css21] Section 17.5.2.1 should be clarified" /> 12 <link rel="match" href="fixed-table-layout-003e02-ref.xht" /> 13 14 <meta name="assert" content="A cell in the first row with specified non-auto 'width' sets the width for its column in the absence of a column element with specified non-auto width. This test checks the 'border-collapse: collapse' model with one non-zero horizontal cell padding and with non-zero symetrical horizontal cell borders." /> 15 16 <style type="text/css"><![CDATA[ 17 div, table {font: 1.25em/1.2 serif;} 18 19 table 20 { 21 border-collapse: collapse; 22 table-layout: fixed; 23 width: 300px; 24 } 25 26 td {padding: 0px 48px 0px 0px;} 27 28 td#tested-cell 29 { 30 background-color: blue; 31 border-left: orange solid 36px; 32 border-right: orange solid 36px; 33 color: blue; 34 width: 80px; 35 } 36 37 div#reference 38 { 39 background-color: black; 40 color: black; 41 margin-left: 50px; 42 width: 200px; 43 } 44 ]]></style> 45 46 </head> 47 48 <body> 49 50 <p>Test passes if the 2 orange slivers and blue stripe are as a whole <strong>exactly as wide as</strong> the black stripe.</p> 51 52 <table> 53 54 <col /> 55 <col /> 56 <col /> 57 58 <tr> 59 <td></td> 60 <td id="tested-cell">E04</td> 61 <td></td> 62 </tr> 63 64 </table> 65 66 <div id="reference">200px wide</div> 67 68 </body> 69 </html>