473,484 Members | 1,596 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 7161
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2385
by: Brian | last post by:
I have a simple catalogue table, and wanted to suggest a width for each column. To do this, I added a colgroup with col elements. <COLGROUP> <COL CLASS="cattitle"> <COL CLASS="material"> <COL...
1
9499
by: Daniel Haude | last post by:
Me again! This time I'd like to prevent an entire column of a table to have no word-wrapping. So I defined this class in the style sheet: ..nobr { white-space: nowrap; } When I define...
4
5600
by: Lachlan Hunt | last post by:
Hi, I was wondering if ::before and ::after pseudo-elements can apply to elements styled with the display: table-* properties. None of my tests worked in either Firefox or Opera, yet I could not...
3
17765
by: David Lee | last post by:
I have some web pages on which I'd like to suppress certain items when printing. This is mostly working nicely: index.htm (here stripped to relevant essentials) has: <head> <link...
38
3746
by: axlq | last post by:
I'm trying to figure out how to display a box that has a width in "em" units. So far no luck. Below is some HTML that displays two rows of 30 'm' characters in lowercase and uppercase, followed...
33
18615
by: David Stone | last post by:
Been trying to specify text alignment within specific columns in an html 4 strict page. According to the w3c specs, <TABLE border="1"> <COLGROUP> <COL> <COL align="char" char=".">...
4
3197
by: TS | last post by:
I am losing my colgroup html element of a table that i toggle back and forth of being visible=true/false. is there any workaround since the rendered html doesn't contain it even though it has not...
1
6857
by: yaugin | last post by:
What is the practical difference between these elements? They seem to accomplish the same thing. Is there an example of how one might be advantageous over the other?
36
5051
by: Roedy Green | last post by:
The only browser I have encountered that supports <colgroup><col class="behold"></colgroup> to apply a CSS style to a whole column, is Microsoft Internet Explorer. I have been told it SHOULD NOT...
0
7082
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6953
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7105
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6813
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4845
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4529
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3046
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3041
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.