...

View Full Version : hyperlinks in different colours on one page



wwwolf
06-06-2004, 02:06 PM
Hello! Can anyone tell me how I can use different hyperlink colours (with different hover, active, ... colours too if possible) in one page? I have done it before but forgot how! (Something with defining a class somewhere...)
Thanks!

gsnedders
06-06-2004, 02:29 PM
CSS:
a:link {color: #0000ff;}
a:visited {color: #7f7f00;}
a:hover {color: #ff0000;}
a:active {color: #ff0000;}

(X)HTML
<a href="http://codingforums.com">CodingForums.com</a>

coothead
06-06-2004, 02:48 PM
Hi there wwwolf,

w3schools.com (http://www.w3schools.com/css/css_pseudo_classes.asp) should give you all the answers :D

coothead

pb&j
06-06-2004, 05:51 PM
to take care of a bunch of links....

.special a:links {color: #0000ff;}
.special a:visited {color: #7f7f00;}
.special a:hover {color: #ff0000;}
.special a:active {color: #ff0000;}

then in your coding...

<div class="special">
enter links as normal in this area
</div>

to take care of a single link....

a.special2:links {color: #0000ff;}
a.special2:visited {color: #7f7f00;}
a.special2:hover {color: #ff0000;}
a.special2:active {color: #ff0000;}

then in your coding...

<a href="pagename.html" class="special2"> text here </a>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum