Click here to get back home

Does Firefox not understand COLGROUP and COL?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Does Firefox not understand COLGROUP and COL? David Stone 06-06-2006
Posted by David Stone on June 6, 2006, 2:05 pm
Please log in for more thread options


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>
<THEAD>
<TR><TH>Vegetable <TH>Cost per kilo
<TBODY>
<TR><TD>Lettuce <TD>$1
<TR><TD>Silver carrots <TD>$10.50
<TR><TD>Golden turnips <TD>$100.30
</TABLE>

should cause the numeric values to align themselves
vertically with the decimal point all at the same
horizontal location. Neither Firefox or Safari do this.

Is this a case of the browsers in question simply not
following the standard, or is there some twist in the
documentation that I've missed?

Can't get this to work using stylesheets either - if
I want anything other than default text alignment in a
specific column, I have to apply it separately for each
td element in that column.

The page I'm actually trying to get to work is this
one:

http://www.chem.utoronto.ca/coursenotes/CHM217/outline.html

which validates fine, but stubbornly refuses to centre the
entries in the "Section" column no matter what I do _unless_
if I align each td individually. I was hoping not to do that...

Posted by David Stone on June 6, 2006, 4:34 pm
Please log in for more thread options



> Been trying to specify text alignment within specific
> columns in an html 4 strict page. According to the
> w3c specs,

Never mind - after poking around the bugzilla pages, it appears
to be the case that NONE of the Mozilla-based browsers implement
COLGROUP and COL as per html 4.01 specs. Given that the problems
I enountered were raised in a bug report several years ago, and are
still not fixed, I'm going to assume that they likely never will be.

This is one of the things where IE follows the standard, and
Mozilla/Firefox/etc don't.

So if you want entries in a column to be centred, and you want
that to be rendered in Mozilla-based browsers, you have to
apply the alignment to each cell individually _regardless_ of
whether you use html/css or just plain html.

The next time someone tells me I should be standards-compliant,
I think I shall just blow a big fat raspberry at them :P

Posted by Alan J. Flavell on June 6, 2006, 5:28 pm
Please log in for more thread options


On Tue, 6 Jun 2006, David Stone wrote:

>
> > Been trying to specify text alignment within specific
> > columns in an html 4 strict page. According to the
> > w3c specs,
>
> Never mind - after poking around the bugzilla pages, it appears
> to be the case that NONE of the Mozilla-based browsers implement
> COLGROUP and COL as per html 4.01 specs.

Indeed. It was discussed on usenet only a few days ago, and is
reportedly the oldest non-fixed bug in Moz-family browsers. Hmmm, ok,
the discussion was in alt.html

> This is one of the things where IE follows the standard, and
/few\
> Mozilla/Firefox/etc don't.

OK so far...

> So if you want entries in a column to be centred, and you want
> that to be rendered in Mozilla-based browsers, you have to
> apply the alignment to each cell individually _regardless_ of
> whether you use html/css or just plain html.

Not quite true. Since Mozilla-based browsers understand enough of
CSS2, you can do this via a stylesheet, as was recently discussed
http://groups.google.co.uk/group/alt.html/browse_thread/thread/e4b2a487ec8e02b4

> The next time someone tells me I should be standards-compliant,
> I think I shall just blow a big fat raspberry at them :P

Nevertheless, it doesn't pay off in the long-term to keep relying on
browser bugs. In this case, you just need two sets of
specification-conforming settings, and you'll pretty much cover the
field.


Posted by David Stone on June 7, 2006, 7:41 am
Please log in for more thread options



> On Tue, 6 Jun 2006, David Stone wrote:
>
> >
> > > Been trying to specify text alignment within specific
> > > columns in an html 4 strict page. According to the
> > > w3c specs,
> >
> > Never mind - after poking around the bugzilla pages, it appears
> > to be the case that NONE of the Mozilla-based browsers implement
> > COLGROUP and COL as per html 4.01 specs.
>
> Indeed. It was discussed on usenet only a few days ago, and is
> reportedly the oldest non-fixed bug in Moz-family browsers. Hmmm, ok,
> the discussion was in alt.html
>
> > This is one of the things where IE follows the standard, and
> /few\
> > Mozilla/Firefox/etc don't.


See my earlier post about applying a border to an object (in my
case, a Flash object). That doesn't work correctly in Moz-family
browsers either.


> OK so far...
>
> > So if you want entries in a column to be centred, and you want
> > that to be rendered in Mozilla-based browsers, you have to
> > apply the alignment to each cell individually _regardless_ of
> > whether you use html/css or just plain html.
>
> Not quite true. Since Mozilla-based browsers understand enough of
> CSS2, you can do this via a stylesheet, as was recently discussed
> http://groups.google.co.uk/group/alt.html/browse_thread/thread/e4b2a487ec8e02b
> 4

I looked at that. It's a bit more work than I care for with my particular
table instance. Curiously enough, the background colour of a COLGROUP
is one of the things that has supposedly been fixed, at least for the
current build. (Well, as near as I can understand what bugzilla seems
to be saying: https://bugzilla.mozilla.org/show_bug.cgi?id=4510)

I ended up adding a class declaration to each td that needed
special formatting. One of the articles in the cited thread suggests
selecting the entire column in dreamweaver and then setting the
desired attributes. When I tried this, dreamweaver inserted a styled
div into each td which, IMO, is even worse.

>
> > The next time someone tells me I should be standards-compliant,
> > I think I shall just blow a big fat raspberry at them :P
>
> Nevertheless, it doesn't pay off in the long-term to keep relying on
> browser bugs. In this case, you just need two sets of
> specification-conforming settings, and you'll pretty much cover the
> field.

I don't see how I'm "relying on browser bugs"? I found a standards-
compliant solution that works on all the browsers I tested. My biggest
beef is that I wasted over 3 hours trying to figure why FF wouldn't do
what it was supposedly meant to do...

Posted by Chris Sharman on June 7, 2006, 9:33 am
Please log in for more thread options


David Stone wrote:
>
>> On Tue, 6 Jun 2006, David Stone wrote:
>>
>>>
>>>> Been trying to specify text alignment within specific
>>>> columns in an html 4 strict page. According to the
>>>> w3c specs,
>>> Never mind - after poking around the bugzilla pages, it appears
>>> to be the case that NONE of the Mozilla-based browsers implement
>>> COLGROUP and COL as per html 4.01 specs.
>> Indeed. It was discussed on usenet only a few days ago, and is
>> reportedly the oldest non-fixed bug in Moz-family browsers. Hmmm, ok,
>> the discussion was in alt.html
>>
>>> This is one of the things where IE follows the standard, and
>> /few\
>>> Mozilla/Firefox/etc don't.
>>
>> Not quite true. Since Mozilla-based browsers understand enough of
>> CSS2, you can do this via a stylesheet, as was recently discussed
>> http://groups.google.co.uk/group/alt.html/browse_thread/thread/e4b2a487ec8e02b
>> 4
>
> I looked at that. It's a bit more work than I care for with my particular
> table instance. Curiously enough, the background colour of a COLGROUP
> is one of the things that has supposedly been fixed, at least for the
> current build. (Well, as near as I can understand what bugzilla seems
> to be saying: https://bugzilla.mozilla.org/show_bug.cgi?id=4510)

I agree that col align & valign should be implemented, but now that you
can use, eg, td:first-child+td+td+td+td to select the 5th column, how is
that too much work ? If you wanted the 95th column it would be a bit
clunky, but doable. Add to that a table id or class, if you need to
distinguish between tables, and you're all set - no need for html td
attributes.

Two standards compliant solutions: one for ie, and one for the gecko
family - each one or two lines of code.

There seems to be some suggestion that the bug is (finally) being worked
on: see https://bugzilla.mozilla.org/show_bug.cgi?id=915
(and if you care, vote for it).

Chris

Similar ThreadsPosted
col vs colgroup May 7, 2008, 5:19 pm
Do not understand validation info April 7, 2006, 2:33 am
tings that I don't understand [was: special pop-up] October 10, 2007, 5:13 pm
trying to understand the BUTTON tag in EXPLORER and MOZILLA August 27, 2005, 5:12 pm
Alt attribute I understand. Title/summary attributes - used for what? June 8, 2005, 10:58 am
DIV not recognized by Firefox - It works only in IE - How to replace it for Firefox? May 8, 2007, 5:13 pm
Firefox and IE are different June 20, 2005, 3:28 am
Why does Firefox use 47 MB of RAM? December 26, 2005, 6:28 am
Firefox bug? April 1, 2008, 9:01 am
Firefox floating bug? November 18, 2004, 4:07 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap