Link color...

S

silas

I'm having a fit trying to set up two sets of links on my page in two
different colors. Even though I've established two style sheets, one always
seems to over-ride the other. Can I have different colors for different
links?

Thanks

silas
**********************************
Calvin: I used to hate writing assignments, but now I enjoy them. I
realized that the purpose of writing is to inflate weak ideas, obscure poor
reasoning, and inhibit clarity. With a little practice, writing can be an
intimidating and impenetrable fog!

Homicidal Psycho Jungle Cat, p62-2
 
S

Sid Ismail

: I'm having a fit trying to set up two sets of links on my page in two
: different colors. Even though I've established two style sheets, one always
: seems to over-ride the other. Can I have different colors for different
: links?


CSS pseudo-classes

A.blue:visited {color: #003399;}
A.blue:link {color: #003399;}
A.blue:active {color: #003399;}
A.blue:hover {color: red;}

A.white:visited {color: #ffffff;}
A.white:link {color: #ffffff;}
A.white:active {color: #ffffff;}
A.white:hover {color: red;}

and then -

<a href="blah1.html" class="blue">Blue Link</a>
<a href="blah2.html" class="white">White Link</a>

Sid
 
S

silas

Sid Ismail said:
: I'm having a fit trying to set up two sets of links on my page in two
: different colors. Even though I've established two style sheets, one always
: seems to over-ride the other. Can I have different colors for different
: links?


CSS pseudo-classes

A.blue:visited {color: #003399;}
A.blue:link {color: #003399;}
A.blue:active {color: #003399;}
A.blue:hover {color: red;}

A.white:visited {color: #ffffff;}
A.white:link {color: #ffffff;}
A.white:active {color: #ffffff;}
A.white:hover {color: red;}

and then -

<a href="blah1.html" class="blue">Blue Link</a>
<a href="blah2.html" class="white">White Link</a>

Sid

Thank you all for your prompt responses (especially Andy who, according to
the times displayed, actually posted his reply [11:25] before I posted my
question [11:29]... ;-) )

Sid, your suggestion worked perfectly. Thanks again.

Silas
********************************************
Calvin: The hard part for us avant-garde post-modern artists is deciding
whether or not to embrace commercialism.

Attack of the Deranged Mutant Killer Monster Snow Goons, p59-2
 
K

kayodeok

Sid, your suggestion worked perfectly. Thanks again.

Sid's example is meant to nudge you in the general direction; you
will get warnings from the CSS Validator if you implement it without
specifying a background color.

I think you ought to take another look at the link Brucie provided.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top