473,549 Members | 2,719 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 7166
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
2390
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
9513
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
5609
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...
3
17777
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
3761
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>...
33
18625
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
3204
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
6865
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
5078
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...
0
7520
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...
0
7450
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...
0
7720
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. ...
1
7470
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...
0
7809
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...
1
5368
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...
0
5088
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3500
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...
1
1941
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.