Web Hosting Talk







View Full Version : Changing Link Color


a1nerd
08-23-2007, 08:30 PM
How do i change the color of one link only. I have several links on my navigation but i just want to change the color of one link to yellow and leave all the other links the same color which is red.

Please put a sample code i can add into my HTML

fastnoc
08-23-2007, 09:06 PM
Use a span tag


<a href="yoururl"><span style="color:#ffff00">Your link text</span></a>

You could also assign an id or class in your css but if it's strictly a one time thing it's easier this way.

Jeremy
08-23-2007, 11:06 PM
If you want it to stand out, i like this http://www.scrollovers.com/

webjunky
08-23-2007, 11:50 PM
That scrollovers script is very cool.

fastnoc
08-24-2007, 12:35 AM
yeah i was thinking the same thing. I could use that on some special places.

Way over the top for most things, but a one off situation that could be slick.

Course I'd probably move the script to my own server unless that breaches the license agreement, but I doubt it would

KentonNetworks
08-24-2007, 01:31 AM
Use a span tag


<a href="yoururl"><span style="color:#ffff00">Your link text</span></a>

You could also assign an id or class in your css but if it's strictly a one time thing it's easier this way.

Hey,

Quick note, you could also use the style within your link tag, such as;


<a href="yoururl" style="color:#FFFF00;">Your link text</a>


Just a simple way of doing this. :)

Hope it helps.

fastnoc
08-24-2007, 01:53 AM
bah. you're right. I ALWAYS forget that stuff. that I can style simple elements.

good catch

a1nerd
08-24-2007, 02:24 AM
Thank you guys it works great :)

HighVoltage123
08-24-2007, 06:09 AM
I see you've already solved that :)

WebDesignGold
08-24-2007, 07:36 AM
I see you've already solved that :)

Great, the whole world was waiting for you to "see" that he's solved the problem. What's the point with your post? please don't waist people's time by these nonsense posts. You have seven such posts now all seen as latest replies.