Forum Moderators: mack

Message Too Old, No Replies

Simple link question

Using link colors.

         

pluto

11:56 pm on Aug 19, 2004 (gmt 0)



Hi, I am new to WW.

How do I set the color of one single link? I know how to set all of the links the same color, but not one single one. thanx!

Krapulator

12:58 am on Aug 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<style type="text/css">
a.emph{
color: red;
}
</style>

<a href="#">This is a normal link</a>
<a href="#">This is a normal link</a>
<a href="#" class="emph">This is a red link</a>

kodaks

1:25 am on Aug 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How would you do that with the visited link color tag?

chrisnrae

1:27 am on Aug 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Depends on if your talking CSS or HTML - for HTML:

Link same color as the rest:
<a href="linkhere.html">Link</a>

Change the color of a single link:
<a href="linkhere.html"><font color="#colorcodehere">Link</font></a>

kodaks

1:40 am on Aug 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks

Krapulator

6:49 am on Aug 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>How would you do that with the visited link color tag?

<style type="text/css">
a.emph:visited{
color: red;
}
</style>
<a href="#">This is a normal link</a>
<a href="#">This is a normal link</a>
<a href="#" class="emph">This is a red link</a>

BillPosters

7:52 am on Aug 20, 2004 (gmt 0)



Change the color of a single link:
<a href="linkhere.html"><font color="#colorcodehere">Link</font></a>

Using the font tag has rightly been considered a no-no for quite a while - and for several very valid reasons.

You really should be using and, just as importantly, recommending CSS methods for this sort of task now.

As the saying goes - "If you're not part of the solution, you're part of the problem", etc… etc… ;)