Bug 14309 - Table captions have incorrect width when the table has vertical borders
Summary: Table captions have incorrect width when the table has vertical borders
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 523.x (Safari 3)
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
Depends on:
Blocks: 3243
  Show dependency treegraph
Reported: 2007-06-22 05:08 PDT by mitz
Modified: 2011-10-31 05:24 PDT (History)
3 users (show)

See Also:

Test case (760 bytes, text/html)
2007-06-22 05:08 PDT, mitz
no flags Details
Caption width off by several pixesl when table has padding. (537 bytes, text/html)
2008-05-14 01:01 PDT, Keith Winkler
no flags Details
Percentage width Caption bug. (806 bytes, text/html)
2008-05-20 11:22 PDT, Jesse
no flags Details
Caption not displaying at 100% of table (3.34 KB, application/xhtml+xml)
2011-03-21 15:16 PDT, Murray Nuttall
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2007-06-22 05:08:22 PDT
The attached test case shows that the width of the caption is wrong when it computes to 'auto' or '100%' and the table has vertical borders.
Comment 1 mitz 2007-06-22 05:08:58 PDT
Created attachment 15179 [details]
Test case
Comment 2 mitz 2007-06-24 13:05:25 PDT
In the "100%" cases, Firefox might be trying to follow this sentence from CSS2.1 17.4: "Percentages on 'width' on the table are relative to the anonymous box's containing block, not the anonymous box itself", as it makes the caption as wide as the body.
Comment 3 Keith Winkler 2008-05-14 00:57:41 PDT
The caption width is also wrong (by 5px or so) when the table has any horizontal padding at all--even if the caption is given the same padding.
Comment 4 Keith Winkler 2008-05-14 01:01:07 PDT
Created attachment 21122 [details]
Caption width off by several pixesl when table has padding.

Created attachment showing caption width off by several pixel.
Comment 5 Jesse 2008-05-20 11:22:25 PDT
Created attachment 21258 [details]
Percentage width Caption bug. 

percentage based width of the caption is using the table as the container not the element containing the table. In this example I have set the table width to 50% and the caption width to 50%. This is showing the caption at 50% of the table width (25% of the page width). Where in all other browsers it is showing the caption and the table at 50% of the page. Indicating that the caption should be contained by the page not the table. Can anyone confirm the W3 recommendation on this?
Comment 6 Murray Nuttall 2011-03-21 15:16:35 PDT
Created attachment 86373 [details]
Caption not displaying at 100% of table

I am having this issue with Windows 7 64-bit using either Chrome or Safari.
Comment 7 Matteo Settenvini 2011-10-31 05:24:42 PDT
Is bug #38358 a dupe of this?
Bug present also on GNU/Linux with latest Epiphany and Google Chrome.