border-collapse-dynamic-table-002.xht (1417B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>CSS Test: border collapse dynamic change to table border width</title> 2 <link rel="author" title="Bernd Mielke" href="mailto:bmlk@gmx.de" /> 3 <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#collapsing-borders" /> 4 <link rel="match" href="border-collapse-dynamic-table-002-ref.xht"/> 5 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 6 <meta name="flags" content="dom" /> 7 <script type="text/javascript"> 8 function doTest(){ 9 var t1 =document.getElementById('target'); 10 t1.style.borderWidth="20px"; 11 } 12 </script> 13 <style type="text/css"><![CDATA[ 14 td { border: 10px green solid;} 15 table {margin: 30px; border-collapse:collapse; border:solid green 11px} 16 ]]></style> 17 </head> 18 <body onload="doTest();"> 19 20 <p>There should be a continuous solid thick border around a grid of 3 rows and 3 columns. The borders inside the grid should be half the thickness of the outside border of the grid.</p> 21 22 <table id="target"> 23 24 <colgroup><col /></colgroup> 25 <colgroup><col /></colgroup> 26 <colgroup><col /></colgroup> 27 <tbody><tr><td>c11</td><td>c12</td><td>c13</td></tr></tbody> 28 <tbody> 29 <tr><td>c21</td><td>c22</td><td>c23</td></tr> 30 </tbody> 31 <tbody> 32 33 <tr><td>c31</td><td>c32</td><td>c33</td></tr> 34 </tbody> 35 </table> 36 37 </body></html>