PDA

View Full Version : Different links in CSS


harv
23-11-2001, 19:07/07:07PM
Does CSS allow different fonts/colors for links
on a page, in a similar way that you can have
different style paragraphs.

e.g
Basic link
A {
color: blue;
}

Red version
A.red (
color: red;
)

Use
<A class="red">

I have tried this but can't get it to work.

Mel
23-11-2001, 20:16/08:16PM
Hi Harv:

First of all change the red definition to {} instead of (), then if you want to define a red class you can either define it as

A:hover{color:red;}
or
you can define a red class

.red {color:red;} then use it as

<A class="red">

Or
A.red

Mostly this is used to define different colors for links, hover links and visited links as in the first example above.

harv
24-11-2001, 16:33/04:33PM
Thanks Mel.