Closed Bug 294900 Opened 20 years ago Closed 20 years ago

border-collapse doesn't apply if table.className is set using javascript if font is specified

Categories

(Core :: Layout: Tables, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bugs-mozilla, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4

I have a table that I am applying a CSS class to using:
tableObject.className='spreadsheet'; 

The css for the class is 

table.spreadsheet{
  border-collapse: collapse;
  font-family: sans-serif; 
}

when run, border-collapse does not appear to be applied- however if I remove the
font-family line it works. This only occurs when the class is applied using
javascript;


Reproducible: Always

Steps to Reproduce:
1. View the attached HTML
2. Click go
Actual Results:  
there is a significant gap between cells (i.e., border-collapse is not being
applied)

Expected Results:  
the borders should collapse leaving no spacing between cells
Attached file Test Case
remove the font-family line and border-collapse works.
Done a little more testing; it appears that any css attributes that change the
size of the cell prevent border-collapse from working, while others (such as
color, cursor, etc) which leave the cell sizing alone do not trigger the bug. 
Seems to work fine in current trunk build. Reporter, could you please retest
with current trunk build:
http://ftp.scarlet.be/pub/mozilla.org/firefox/nightly/latest-trunk/
Thanks.
Latest build seems to fix it.

(In reply to comment #3)
> Seems to work fine in current trunk build. Reporter, could you please retest
> with current trunk build:
> http://ftp.scarlet.be/pub/mozilla.org/firefox/nightly/latest-trunk/
> Thanks.

Resolved WFM as per comment 3 and comment 4
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Keywords: testcase
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: