Closed Bug 409254 Opened 18 years ago Closed 14 years ago

Table borders disappear when there is a <tfoot> and an empty <tbody> with border-collapse

Categories

(Core :: Layout: Tables, defect)

1.9.2 Branch
x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 217769

People

(Reporter: greenie2600, Unassigned)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 If you construct a simple table containing a <thead>, a <tfoot>, and an *empty* <tbody> - that is, a <tbody> which contains no <tr>s - and apply collapsed borders with CSS, only the top border appears. This happens in both standards and quirks mode. It happens regardless of the border width (i.e., it's not just shifting table cells by a pixel and obscuring the borders; it's not rendering the borders at all). It does *not* occur if the border-collapse rule *or* the <tfoot> is removed. Strictly speaking, an empty <tbody> is invalid (X)HTML, but it's useful (and common) in AJAX applications where a user dynamically adds or removes rows. For that reason, I feel that Firefox should tolerate this bit of non-well-formedness. See attached test case for a clearer explanation. Reproducible: Always Steps to Reproduce: 1. View the test case in Firefox. Actual Results: The second table has only a top border. Expected Results: I expected the second table to look just like the third table (including all borders), but without the data row.
This happens in Firefox 3 Nightlies too. Since borders are drawn outside the object no matter strict or quirks in Firefox 3, and that the text for the second one is in the same place as the first, it seems the border has somehow been drawn white or transparent or space has been left but border not drawn. Sorry I can't help much -- I know nothing about C so I can't make a patch... Try adding a "border: 1px #000 solid;" to thead, tbody and tfoot. It might work as a workaround.
This bug was originally reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.6 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME http://www.mozilla.com http://support.mozilla.com/kb/Managing+profiles http://support.mozilla.com/kb/Safe+mode
Whiteboard: [CLOSEME 2010-07-30]
Version: unspecified → 2.0 Branch
I can confirm the bug, it still exists in ff 3.6.8
No reply, INCOMPLETE. Please retest with Firefox 3.6.8 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
Tried in Firefox 3.6.8 with new profile, bug still exists. System: Ubuntu 10.04
Component: General → Layout: Tables
Product: Firefox → Core
QA Contact: general → layout.tables
Whiteboard: [CLOSEME 2010-07-30]
Version: 2.0 Branch → 1.9.2 Branch
Status: RESOLVED → UNCONFIRMED
Resolution: INCOMPLETE → ---
Confirm the bug at Firefox/3.6.8 Intel Mac OS X 10.5
Confirm the bug in Firefox 4.0.1 and I also noticed some specific behaviour. Borders are on page load disappeared and if you hover tbody rows with coursor, borders suddenly appear at least until the browser is resized or another way redrawn (minimilized and maximalized again)
I can also confirm this bug still exists, tested with a new profile, on Firefox 4.0.1, Mac OS X 10.6.7, and also on FF 3.6.17 on WinXP. The original poster noted that this markup under HTML 4.0.1 was, strictly speaking, invalid. However, under the current draft for HTML 5, it is valid to have a <tbody> with zero or more <tr> elements. (http://www.w3.org/TR/html5/tabular-data.html#the-tbody-element) so this will likely become a more common issue going forward.
This bug is still present in FF 7. As Richard noted, empty TBODY's are allowed in HTML5. Could we please get this fixed?
workaround tbody:empty{display:none;} I confirm that the bug still exists (latest trunk)
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: