W3C home > Mailing lists > Public > www-style@w3.org > March 2000

Re: default.css

From: fantasai <fantasai@escape.com>
Date: Thu, 16 Mar 2000 18:30:46 -0500
Message-ID: <38D16EA6.D6604A31@escape.com>
To: "Liu, Jay" <Jay.Liu@nordstrom.com>, www-style@w3.org
> Is there a way to use 2 different HREF styles in CSS on one page?
> for example, for the body content links to be 'blue', a certain
> paragraph to be 'red'?

Use a class.

in stylesheet:

 a:link {color: blue}
 p.red a:link {color: red}
     /* all links inside a <p> with class "red" will be red */

in document:

 this is a normal paragraph. <A href="file.htm">blue link</A>
 <p class="red">
 this paragraph is classified. <A href="file.htm">red link</A>
Received on Thursday, 16 March 2000 18:38:14 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:53 UTC