|
Convenient web based access to our favorite web design Usenet groups
|
 |
This is Interesting: Free Magazines for Graphics designers and webmasters
| Author |
| Thread |
 |
|
|
|
|
|
 |
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
 |
Re: Writing Valid CSS (help) |
 |
|
 |
|
|
|
  12-13-05 - 11:52 PM
|
In article <2xfkyylxuv3j$.tio0w47en4s2$.dlg@40tude.net>,
Beauregard T. Shagnasty <a.nony.mous@example.invalid> wrote:
>Rob Stampfli wrote:
...
>
>No. In his example, a color is specified for "div.navigationItem a" and
>a background color is specified for "div.navigationItem a:link". You
>need to assign both for each selector.
This is a poor example, because the color of a:link *is* typically
set implicitly so its color would generally not be inherited, but
the CSS validator consistently complains, as you say, if you assign
either a color or background-color anywhere without specifying the
other.
But, shouldn't the color and/or background-color be inherited if
one is not explicitly given?
In other words, if you've set the background-color in <body>,
why should you need to restate it explicitly if you later set the
color in, say, a <span>? Why should the validator issue a warning
in such a case?
Rob
|
|
|
| [
Post Follow-Up to this message ]
|
|
|
|
|
 |
 |
Re: Writing Valid CSS (help) |
 |
|
 |
|
|
|
  12-13-05 - 11:53 PM
|
Rob Stampfli <restamp@hotmail.com> wrote:
> But, shouldn't the color and/or background-color be inherited if
> one is not explicitly given?
Yes. But from what is it going to be inherited?
> In other words, if you've set the background-color in <body>,
> why should you need to restate it explicitly if you later set the
> color in, say, a <span>? Why should the validator issue a warning
> in such a case?
The C in CSS is for "Cascading". Rules from other style sheets can cascade
with your rules. As an example, you might specify color and background for
BODY elements, but a user style sheet might specify color and background
for P elements. If you specify only color for SPAN elements, which
background will they be shown against?
--
Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, darin@htmlhelp.com, http://www.HTMLHelp.com/
"I'd love to make time, if only I could find the recipe."
|
|
|
| [
Post Follow-Up to this message ]
|
|
|
|
|
 |
|
|
 |
| All times are GMT. The time now is 02:16 PM. |
 |
|
|
|
|
|  |
|