collapsing-border-model-010a.xht (2114B)
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: border-collapse - 'border-spacing' does not apply to 'border-collapse: collapse' tables</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#collapsing-borders" /> 11 <link rel="match" href="../reference/ref-filled-green-100px-square.xht" /> 12 13 <meta name="flags" content="ahem" /> 14 <meta name="assert" content="'border-spacing' property only applies to tables applying the 'border-collapse: separate' model. When an HTML/XHTML table applies the 'border-collapse: collapse' model, then any 'border-spacing' declaration is ignored." /> 15 16 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 17 <style type="text/css"><![CDATA[ 18 table 19 { 20 background-color: red; 21 border-collapse: collapse; 22 border-spacing: 50px; 23 color: green; 24 font: 1em/1 Ahem; 25 } 26 27 td 28 { 29 background-color: green; 30 border: 0.5em solid green; 31 padding: 5px; 32 } 33 34 tbody > tr > td, tr > td:first-child {padding: 0px;} 35 ]]></style> 36 37 38 </head> 39 40 <body> 41 42 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 43 44 <table> 45 46 <thead> 47 <tr> 48 <td>1</td> <td>2</td> <td>3</td> 49 </tr> 50 </thead> 51 52 <tfoot> 53 <tr> 54 <td>7</td> <td>8</td> <td>9</td> 55 </tr> 56 </tfoot> 57 58 <tbody> 59 <tr> 60 <td>4</td> <td>5</td> <td>6</td> 61 </tr> 62 </tbody> 63 64 </table> 65 66 <!-- 67 68 1st col 2nd col 3rd col 69 70 8 8 8 71 0 5 5 72 8 0 16 0 8 5 16 5 8 5 16 5 8 thead == 100px 73 0 5 5 74 8 8 8 75 0 0 0 76 8 0 16 0 8 0 16 0 8 0 16 0 8 tbody == 100px 77 0 0 0 78 8 8 8 79 0 5 5 80 8 0 16 0 8 5 16 5 8 5 16 5 8 tfoot == 100px 81 0 5 5 82 8 8 8 83 ==================================================== 84 100px 100px 100px 85 86 --> 87 88 </body> 89 </html>