Closed Bug 296070 Opened 15 years ago Closed 14 years ago

Caption width in empty table


(Core :: Layout: Tables, defect)

Not set





(Reporter: leon.stringer, Unassigned)




(Keywords: testcase, Whiteboard: [reflow-refactor])


(1 file)

175 bytes, text/html
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Epiphany/1.6.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Epiphany/1.6.1

If you have an empty table with a caption, the width of the caption element is
as wide as the longest word in the caption forcing the text to always wrap if
there's more than one word.

Contrast IE 5.5's rendering of captions for empty tables:

1. For an empty table the caption is as wide as all the caption text i.e. so it
appears on one line (or wraps at window edge). (See and

2. For an empty table with the width attribute set to 100%, the caption is as
wide as the containing block. (See and

There's some room for personal preference in the specs but I think the IE
interpretation is better than the Mozilla/Gecko way.

Reproducible: Always

Steps to Reproduce:
1. Create a table with just the table element and the caption element.
Actual Results:  
Text wrapped unneccessarily.

Expected Results:  
Render caption as wide as the text required (no wrapping).
Attached file testcase
Keywords: testcase
Whiteboard: [reflow-refactor]
(In reply to comment #1)
> Created an attachment (id=189154) [edit]
> testcase

I 100% agree with this rubbish. I also use table captions on and it does not render well in firefox.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20061208 Minefield/3.0a1 ID:2006120812 [cairo]

Seems fixed by reflow branch landing
Closed: 14 years ago
Depends on: reflow-refactor
Resolution: --- → FIXED
Adding in-testsuite? nomination per bz's request in m.d.t.l. Sorry for the bugspam.
Flags: in-testsuite?
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.