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

RE: default.css

From: Liu, Jay <Jay.Liu@nordstrom.com>
Date: Thu, 16 Mar 2000 20:04:18 -0500 (EST)
Message-ID: <375C7A1CADA9D311AE81009027876216DC5B05@m0801p10.nordstrom.com>
To: "'fantasai'" <fantasai@escape.com>, www-style@w3.org
many thanks!

-----Original Message-----
From: fantasai [mailto:fantasai@escape.com]
Sent: Thursday, March 16, 2000 3:31 PM
To: Liu, Jay; www-style@w3.org
Subject: Re: default.css


> 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:

 <p>
 this is a normal paragraph. <A href="file.htm">blue link</A>
 </p>
 <p class="red">
 this paragraph is classified. <A href="file.htm">red link</A>
 </p>
Received on Friday, 17 March 2000 07:08:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:04 GMT