OLD | NEW |
(Empty) | |
| 1 <style> |
| 2 #thecol { width: 200px; } |
| 3 #thecol2 { width: 300px; } |
| 4 td { height: 25px; } |
| 5 </style> |
| 6 <script type="text/javascript"> |
| 7 onload = function () { |
| 8 var col = document.getElementById('thecol'); |
| 9 var col2 = document.getElementById('thecol2'); |
| 10 var output = document.getElementById('test-output'); |
| 11 col.offsetTop; |
| 12 col.style.width="100px"; |
| 13 col2.style.width="200px"; |
| 14 checkLayout("#td1", output); |
| 15 checkLayout("#td2", output); |
| 16 checkLayout("#td3", output); |
| 17 checkLayout("#td4", output); |
| 18 checkLayout("#td5", output); |
| 19 checkLayout("#td6", output); |
| 20 checkLayout("#td7", output); |
| 21 checkLayout("#td8", output); |
| 22 checkLayout("#td9", output); |
| 23 } |
| 24 </script> |
| 25 <script src="../../resources/check-layout.js"></script> |
| 26 Tests that the width of table cell changes on changing the colgroup width to new
width. |
| 27 <table> |
| 28 <colgroup> |
| 29 <col id="thecol" span="2" style="background-color:red"> |
| 30 <col id="thecol2" span="1" style="background-color:blue"> |
| 31 </colgroup> |
| 32 <thead> |
| 33 <tr> |
| 34 <td id="td1" data-expected-width="100"></td> |
| 35 <td id="td2" data-expected-width="100"></td> |
| 36 <td id="td3" data-expected-width="200"></td> |
| 37 </tr> |
| 38 </thead> |
| 39 <tfoot> |
| 40 <tr> |
| 41 <td id="td4" data-expected-width="100"></td> |
| 42 <td id="td5" data-expected-width="100"></td> |
| 43 <td id="td6" data-expected-width="200"></td> |
| 44 </tr> |
| 45 </tfoot> |
| 46 <tbody> |
| 47 <tr> |
| 48 <td id="td7" data-expected-width="100"></td> |
| 49 <td id="td8" data-expected-width="100"></td> |
| 50 <td id="td9" data-expected-width="200"></td> |
| 51 </tr> |
| 52 </tbody> |
| 53 </table> |
| 54 <div id="test-output"></div> |
OLD | NEW |