wwwolf
06-06-2004, 01: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, 01: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, 01:48 PM
Hi there wwwolf,
w3schools.com (http://www.w3schools.com/css/css_pseudo_classes.asp) should give you all the answers :D
coothead
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>