Closed Bug 76497 Opened 23 years ago Closed 20 years ago

setting CSS property visibility: collapse on COL element doesn't collapse the column (<col>, <colgroup>, table, style, visibility, collapsed)

Categories

(Core :: Layout: Tables, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: martin.honnen, Unassigned)

References

Details

(Keywords: css2, testcase, Whiteboard: Visit bug 370353)

Attachments

(2 files)

Accoding to the CSS 2 docs you should be able to collapse a table column by 
setting 
  visibility: collapse
on the COL element. I don't get that effect however with Mozilla.

<html>
<head>
<title>col test</title>
</head>
<body>
<input type="button" value="toggle column visibility"
       onclick="with (document.getElementById('aCol').style)
                 if (visibility == '')
                   visibility = 'collapse';
                 else
                   visibility = '';"
/>
<table border="1">
<col id="aCol"
     style="background-color: blue;" 
     onmouseover="alert(event.type + ' for ' + event.target);"
>
<col style="background-color: red;">
<thead>
<tr>
<th>
Name
</th>
<th>
Home
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Kibo
</td>
<td>
<a href="http://www.kibo.com">http://www.kibo.com</a>
</td>
</tr>
</tbody>
</table>
</body>
</html>
It actually looks like visibility:collapse just has no effect on <col> elements
(even if set with an inline style attribute).  Attaching testcase.

Seeing this on linux build 2001-04-17-08
Keywords: css2
OS: Windows 95 → All
Hardware: PC → All
Table layout problem, over to karnaze.
Assignee: jst → karnaze
And 'hidden' doesn't work, it only removes the background-color!
the border-collapsing code is currently disabled. Please see bug 41262
This bug is about column-collapsing, not border-collapsing.  Not the same thing.
Moving to m0.1.0.1
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0.1
Is this a dupe of bug 32199?
No.  This is about elements with display:table-column, not about elements with
display:block or display:inline as bug 32199 is.  The behavior of
visibility:collapse is very different for things that have display:table-column
Keywords: testcase
This issue is similar to bug 77019 (which is about collapsing a table's row
rather than column).  I have found some cases where both rows and columns do and
do not behave correctly in Mozilla 1.0.0+ nightly builds (I am using build
2002051008 for OS/2).

Note the test in the Debug menu, Viewer Demos sub-menu, #4 Simple Tables.  The
first two examples of row and column collapsing can be extracted (copy and paste
from the page source to a new page) and they display collapsed rows and
collapsed columns as expected (see http://syntheticdimension.net/test4.html
which has been validated as HTML 4.01 by the w3c).

But then if we remove the third and fourth tables from that (simply deleting
those tables from the HTML code and leaving absolutely everything else in the
file intact) the first example of collapsed rows and collapsed columns fails
(see http://syntheticdimension.net/test4a.html which has also been validated as
HTML 4.01 by the w3c).

Both pages are valid HTML and use exactly the same code for the first and second
tables.  The only difference is that the second test page above has had the
third and fourth tables deleted.  This simple act causes table 2 to display
incorrectly in test4a.html where it worked correctly in test4.html.  Same code
but different display even in the same browser version.  And this was the code
taken from the Mozilla debug tests which are included with the browser binaries.
Priority: -- → P3
Target Milestone: mozilla1.0.1 → Future
In 1.1 final for Linux, columns are hidden but not collapsed.  Also, reflowing
the page seems to make the column borders (but not content!) reappear.
mass reassign to default owner
Assignee: karnaze → table
Status: ASSIGNED → NEW
Component: DOM Style → Layout: Tables
QA Contact: ian → madhur
Target Milestone: Future → ---
Target Milestone: --- → Future
.
Summary: setting CSS property visibility: collapse on COL element doesn't collapse the column → setting CSS property visibility: collapse on COL element doesn't collapse the column (<col>, <colgroup>, table, style, visibility, collapsed)
"display: none" have no effect on "<col>" either. Shouldn't this bug be of hire
priority since (a) it should work according to CSS and (b) it works correctly on IE.
no it should not have higher priority as there is already a patch in bug 77019
Depends on: 77019
fixed by checkin for bug 77019
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Bernd, 

visibility: collapse on <col> and <colgroup> in border-collapse: separate model stopped working on the trunk for now quite some time (say, ~=6 weeks). In other words, test #5 (<col> visibility with border-collapse: separate) and test #7 (<colgroup> visibility with border-collapse: separate) taken from
 
attachment 147933 [details] 

were working before (say, ~=6 weeks; after reflow branch; at the time when table caption became as wide as document, not as wide as table). Now, they don't.

Same thing with the demo page

http://www.gtalbot.org/DHTMLSection/TableRowColumnCollapse.html

So, should I create a new bugfile or reopen this one?

Thank you for your understanding here,

Gérard
>So, should I create a new bugfile or reopen this one?

As this is not a flaw in the patch, the patch did what it was supposed to do please open a new bug. Minimized test cases are always welcome.

It would be cool to verify that it did change with the reflow branch landing.
> please open a new bug.
For fans of this bug, visit bug 370353
Whiteboard: Visit bug 370353
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: