Closed Bug 33244 Opened 23 years ago Closed 23 years ago

[FIXED]TD Shouldn't have to have a spacer gif for background color to show


(Core :: CSS Parsing and Computation, defect, P3)

Windows 98





(Reporter: obijuan, Assigned: pierre)


(Keywords: testcase)


(1 file)

Mozilla forces HTML programmers to put something inside each table cell even in
cases when all we want to display is the background color of a cell.

This is pervasive, as far as I can tell, and applies to both the HTML bgcolor
and the CSS background-color declaration.  It shouldn't be necessary to put a
spacer gif inside each table cell, as it only bloats the code and forces
unnecessary download by the client.

This is, in my opinion, a pretty important bug, and would really help reduce
time for HTML development, while also simplifying the code we have to work with.

- Aaron Buckner
According to the CSS2 spec the default value for empty-cells should be 'show'.
Mozilla currently has 'hide' which is correct in quirks mode but not in strict mode.
Ever confirmed: true
Guess this is more a layout problem since it is just the default css value that
is wrong.

Chaning component and reassigning...
Assignee: karnaze → troy
Component: HTMLTables → Layout
Keywords: testcase
QA Contact: chrisd → petersen
Changing back to tables, because it sounds table specific to me
Assignee: troy → karnaze
Component: Layout → HTMLTables
QA Contact: petersen → chrisd
This actually is a stylesystems bug since it is just the default value 
of 'empty-cells' that is wrong. Should be:

In quirks: 'hide'
In strict: 'show'

(Is now 'hide' in both)

Note to, the problem of backgrounds not shown even 
when empty-cells are set to 'show' is covered in bug 8113.
Assignee: karnaze → pierre
Component: HTMLTables → Style System
The default value could be 'hide' for the TABLE element in HTML, though...
According to the HTML spec empty cells should show (or rather; there is nothing 
in the spec that says that they should hide) so I still think this has to be 
solved by using a quirks hack.
I'll check in the fix when the tree opens.
Thanks to for the testcase and the investigation.
Summary: TD Shouldn't have to have a spacer gif for background color to show → [FIXED]TD Shouldn't have to have a spacer gif for background color to show
Target Milestone: --- → M16
What fix is being checked in?  Will it affect conformance to section 17.5.1
(rule 6) of CSS2?
I changed the default value for empty-cells: 'hide' in quirks mode and 'show' in 
strict mode. MacIE5 does the same thing.

The transparency of empty cells (17.5.1#6) was broken and stays so (bug 8113). 
I'm going to attach a small testcase there.
fix checked in nsStyleContext.cpp
Closed: 23 years ago
Resolution: --- → FIXED
Verified bug fixed. Quirk default is 'hide' and strict default is 'show'
Quirks mode / Nav DTD 
A document without a DOCTYPE declaration 


I don't agree quirks mode should have a need for a spacer image. There is 
nothing that will get broken by removing the need for the spacer for existing 
pages. If the spacer is placed there, it will not affect anything and will work 
fine whether show is default or not. Therefore, show should always be default.

Anyway, a lot of pages don't have any doctype and should be automatically 
transitional, not quirks.

The quirks mode rendering is incorrect, and fixing it won't have any adverse 

Netscape 4.x had a bug in this respect, and if someone forgets to put the 
doctype, they will see this bug. I don't think that is correct.
Please see the recent changes to bug 8113.
Quirks mode shouldn't be the default.  I think the name "Quirks" says it all.
*Please* don't make this into a "what should trigger quirks/standard mode" bug!

However the default value for empty-cells in quirks mode could do with a 
discussion (I'd personally like 'show' to be default). But I'd recommend 
starting that discussion in n.p.m.layout
Quirks mode _isn't_ the default. We only do it for stuff sent over the wire as
text/html, and even some of those get treated in Standard mode.
I know that by default mozilla renders Empty Cells as "hide".  And that's about 
all I know, except I know I shouldn't have to put a spacer GIF in a TD to assign 
a background color.

Anyone who does HTML often know's this is a major deficiency and that MSIE 
already [correctly] displays empty cells as "show".  I like Mozilla, but this 
should honestly be an easy one!
You need to log in before you can comment on or make changes to this bug.