C
Csaba Gabor
I am getting a situation in Firefox that I don't understand. If I set
the border-collapse style to collapse on a TABLE and override a single
border with a style setting declared in the TD as a red thicker border,
it is drawn as expected (with the red border).
If however, that red border is specified by changing the style in
javascript, the border is not changed. In IE 6, the border is red in
both cases. Has anyone run across this? - I didn't find a matching bug
in http://bugzilla.mozilla.org, but I may have missed it.
Thanks for any tips,
Csaba Gabor from Vienna
Example: The red border IS DRAWN when the TD style is set in HTML
(working version):
<body>
<table id=tab border style="border-collapse:collapse">
<tr><td colspan=3 align=center
style="border-bottom:solid 3px red">Table title</td></tr>
<tr><td>row 1, col 0</td><td>row 1, col 1</td>
<td>row 1, col 2</td></tr>
</table></body>
Example: the red border IS NOT DRAWN when TD style is set with JS (non
working version). Note that if the border-collapse is removed from the
table declaration, the red border will be drawn. The border attribute
has no effect on whether the red border appears or not. Also, the red
border ID DRAWN if I move the borderCollapse to JS.
<body onload='init()'>
<table id=tab border style="border-collapse:collapse">
<tr><td colspan=3 align=center>Table title</td></tr>
<tr><td>row 1, col 0</td><td>row 1, col 1</td>
<td>row 1, col 2</td></tr>
</table>
<script type='text/javascript'>
function init() {
var tbl=document.getElementById('tab');
tbl.rows[0].cells[0].style.borderBottom = "solid 3px red";
}
</script>
</body>
the border-collapse style to collapse on a TABLE and override a single
border with a style setting declared in the TD as a red thicker border,
it is drawn as expected (with the red border).
If however, that red border is specified by changing the style in
javascript, the border is not changed. In IE 6, the border is red in
both cases. Has anyone run across this? - I didn't find a matching bug
in http://bugzilla.mozilla.org, but I may have missed it.
Thanks for any tips,
Csaba Gabor from Vienna
Example: The red border IS DRAWN when the TD style is set in HTML
(working version):
<body>
<table id=tab border style="border-collapse:collapse">
<tr><td colspan=3 align=center
style="border-bottom:solid 3px red">Table title</td></tr>
<tr><td>row 1, col 0</td><td>row 1, col 1</td>
<td>row 1, col 2</td></tr>
</table></body>
Example: the red border IS NOT DRAWN when TD style is set with JS (non
working version). Note that if the border-collapse is removed from the
table declaration, the red border will be drawn. The border attribute
has no effect on whether the red border appears or not. Also, the red
border ID DRAWN if I move the borderCollapse to JS.
<body onload='init()'>
<table id=tab border style="border-collapse:collapse">
<tr><td colspan=3 align=center>Table title</td></tr>
<tr><td>row 1, col 0</td><td>row 1, col 1</td>
<td>row 1, col 2</td></tr>
</table>
<script type='text/javascript'>
function init() {
var tbl=document.getElementById('tab');
tbl.rows[0].cells[0].style.borderBottom = "solid 3px red";
}
</script>
</body>