Entry
When creating a html document how can i change the color of one link to differ my other text links?
May 8th, 2008 20:38
dman, i can do it, foo bar, Pravin Paratey, Designer Mike, Tony Hughes, Dave, Joey Neary, http://sturly.com
You have to use css.
For the one link you have to create an extra file eg. style.css.
A.menu {COLOR: white}
A.menu:link {COLOR: white}
A.menu:active {COLOR: white}
A.menu:visited {COLOR: white}
A.menu:hover {COLOR: white}
If you want to change the color, just write the preferred color instead
of white.
Open the file where you want to use this and add this line after <title>
<LINK REL="StyleSheet" HREF="style.css" TYPE="text/css">
When you want to use it refer to the class like that:
<a href="page.html" class="menu">
-------------------------------------------
<a href="#" style="color:#CC0000">Link Text Here</a>
CSS is best way to do it.
-------------------------------------------
You could also create a new class in your stylesheet:
.greenlink a {COLOR: green}
And then assign this class to the link you want different
<a href="#" class="greenlink">This link is green</a>