nonethefewer: (Default)
Chris ([personal profile] nonethefewer) wrote2009-11-20 10:26 am
Entry tags:

(no subject)

Dear the world:

In CSS, how do I have it so that a style affects all tags unless a particular class is used?

In this, all links should be blue, unless a.foodog, in which case ignore it.

Not just set the class of .foodog -- the links in question are set with style tags, so I can't touch those.

[identity profile] ethernight.livejournal.com 2009-11-22 08:27 am (UTC)(link)
Style set on a html tag takes prescient over css definitions.'

So if you have:

a.foodog { color: blue }
this link would be blue ()
this link would be red ()
this link would be blue ()

On the other hand, if you just want to override the color on a specific class from the default, you need to set it to something explicitly.

a { color: blue }
a.foodog { color: red }

this link would be blue ()
this link would be red ()

[identity profile] ethernight.livejournal.com 2009-11-22 08:28 am (UTC)(link)
Woops, forgot to use > and < so that would show up. Oh well, you know how to view source.