Timothy Madden <batman@rmv.spam.home.ro> wrote:
[color=blue]
> I have found in CSS2 specification that the color of table columns
> is not specificaly affected by setting the color property on COL
> elements (unlike width, for example).[/color]
By the specification, it does not affect the color at all. Many people
think this is very unfortunate, and some people think there's a good
explanation to this. Meanwhile, the pragmatist uses a class attribute
in each and every cell, in order to be able to style a table well.
[color=blue]
>
http://web.ss.pub.ro/~bat/HelloWorld.php
>
> has a blue column in IE6.0 and a black one in Netscape 7.1.[/color]
The latter is the rendering that conforms to the specification.
No big surprise, really?
[color=blue]
> I validated my CSS (with online CSS validator) and it gave me no
> warning. Now why is that ?[/color]
You have unrealistic expectations on what the "CSS validator" does.
It's simply a syntax checker with a handful of other checks too, meant
to detect potential practical problems.
There is no syntax error in
COL#frstcol {color: blue; }
though a good checker would issue a warning about not setting
background when you set color (the WDG CSS checker does, but it is
otherwise limited). A CSS checker has no way of knowing that this rule
will refer to an element that will be displayed as table column and
that therefore the rule will have no effect on conforming browsers.
(Admittedly a checker could, in some situations, peek at the HTML
markup, if available, and use information that says that probably col
elements are by default rendered as columns. But that's really beyond
the job of a CSS checker. After all, the style sheet could be written
for a YuccaML document where COL means Cool Oriental List.)
(Didn't you notice the error message about width: '100%', by the way?)
[color=blue]
> Which one of the CSS validator, IE6.0 and Nestcape 7.1 is buggy ?[/color]
All of them, of course. Any nontrivial program has bugs.
[color=blue]
> I'm sorry to say I tend to blame the CSS validator ...[/color]
Please feel free to do so. They deserve that as long as they have such
a misleading name for it. But it's actually a useful, almost
indispensable tool - you just need to understand what it does, and what
it does not do.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/