473,889 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
+ 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.getEle mentById( '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)cybers pace.org | don't, I need to know. Flames welcome.
Jul 21 '05 #1
2 7179
Christopher Benson-Manica <at***@nospam.c yberspace.org> wrote:
function foo() {
document.getEle mentById( '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)cybers pace.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
2401
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 CLASS="purchase"> </COLGROUP> But I'm wondering: couldn't I just put those classes in the th
1
9538
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 table cells like this: <td class="nobr"> everything works
4
5641
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 find anywhere in either the CSS2.1, CSS3 Selectors or CSS3 Generated and Replaced Content Module specs that defines which elements these pseudo-elements actually apply to. Specifically, I was wondering if something like this were possible:
3
17808
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 rel="stylesheet" href="style0.css" type="text/css"> <link rel="stylesheet" href="print0.css" type="text/css" media="print"> <head> <body>
38
3822
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 by a 30em-wide table and a 30em-wide div block. I'm using HTML 4.01 Transitional doctype. ================================ <p>lines of 30 M:<br> MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM<br> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm<br>
33
18661
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="."> </COLGROUP>
4
3224
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 been explicitely been made invisible? note also that even when the table is made visible=true, colgroup still doesn't show up
1
6896
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
5138
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 do so, since this is not part of the specification. How then to you apply styles to entire columns? Surely you don't have to write <td class="behold"on every row item.
0
9962
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9810
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11198
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10889
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10442
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9609
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7993
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5829
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4647
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.