469,350 Members | 1,736 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,350 developers. It's quick & easy.

display property for colgroup

I have the following markup and script:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>test</title>
<script type="text/javascript">
function foo() {
document.getElementById( 'foo' ).style.display='none';
}
</script></head>
<body>
<table>
<colgroup id="foo">
<col>
<colgroup id="bar">
<col>
<tr>
<td>foo</td>
<td>bar</td>
</tr>
<tr>
<td>foo</td>
<td>bar</td>
</tr>
</table>
<div><input type="button" onclick="foo()"></div>
</body></html>

It validates as 4.01 strict. The button is intended to hide the first
column of the table when clicked. It does in fact do this in IE6, but
not in NS 7.1 or Firefox. Am I making a mistake, or asking too much
of the other UA's?

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 21 '05 #1
2 7003
Christopher Benson-Manica <at***@nospam.cyberspace.org> wrote:
function foo() {
document.getElementById( 'foo' ).style.display='none';
} <colgroup id="foo"> It validates as 4.01 strict. The button is intended to hide the first
column of the table when clicked. It does in fact do this in IE6, but
not in NS 7.1 or Firefox. Am I making a mistake, or asking too much
of the other UA's?


See http://www.w3.org/TR/CSS21/tables.html#q4
display does not apply to columns.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #2
Steve Pugh <st***@pugh.net> wrote:
See http://www.w3.org/TR/CSS21/tables.html#q4
display does not apply to columns.


Hm, thanks. It seems that visibility: collapse can accomplish
something very similar to display: none - is that correct?

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Brian | last post: by
1 post views Thread by Daniel Haude | last post: by
3 posts views Thread by David Lee | last post: by
38 posts views Thread by axlq | last post: by
33 posts views Thread by David Stone | last post: by
1 post views Thread by yaugin | last post: by
36 posts views Thread by Roedy Green | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.