User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 i am trying to hide an entire column of a table. in order to do this, i created COL tags for each column i had and gave them all a unique ID. i then tried making a column (id="somecol") disappear using DOM, but it failed. i thought maybe i did something wrong, but it worked as expected in IE (blech!). i then tried setting the atribute explicitly, also to no avail. Reproducible: Always Steps to Reproduce: 1. create a table 2. create a COL tag for each col and give it a unique name 3. create a couple rows of data 4. choose one COL to put an inline style attribute => style="display: none;" 5. view the page and weep as it doesn't work Actual Results: i got a table that was exactly like it should have been, minus the visibility of the COL in question. Expected Results: it should have rendered the table just as it would have been, had the entire COL in question not existed. look at IE for an example of how it should work. (the first time i've ever utteres those words.)
i thought my comments might have been a bit confusing, so i want to clarify with an example. <table> <col id="one" /><col id="two" style="display: none;" /><col id="three /> <tbody> <tr><td>1x1</td><td>1x2</td><td>1x3</td></tr> <tr><td>2x1</td><td>2x2</td><td>2x3</td></tr> <tr><td>3x1</td><td>3x2</td><td>3x3</td></tr> </tbody> </table> everything in COL #2 should be hidden in the output, but is not.
First: from http://www.w3.org/TR/2003/WD-CSS21-20030128/tables.html#q2 Elements with 'display' set to 'table-column' or 'table-column-group' are not rendered (exactly as if they had 'display: none'), but they are useful, because they may have attributes which induce a certain style for the columns they represent. Second: There is no style resolution for col tags. What you want should be done via visibility. http://www.w3.org/TR/2003/WD-CSS21-20030128/tables.html#dynamic-effects But be warned there is : http://bugzilla.mozilla.org/show_bug.cgi?id=77019
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.