Connecting Tech Pros Worldwide Help | Site Map

borderCollapse peculiarity in FF

 
LinkBack Thread Tools Search this Thread
  #1  
Old December 5th, 2005, 09:45 AM
Csaba Gabor
Guest
 
Posts: n/a
Default borderCollapse peculiarity in FF

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>


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.