PDA

View Full Version : Hover Links



staino
20 Jun 2007, 07:46 AM
how do i make multiple types of hover links. so, have one link go one color when a mouse pointer goes over it, and another link glow another color.

also how do i change the color of a link and keep the hover effect color.

karinne
20 Jun 2007, 08:53 AM
By assigning a class to them

CSS


a.theselinks:link, a.theselinks:visited, a.theselinks:active {
color: #900;
text-decoration: none;
}

a.theselinks:hover {
color: #f00;
text-decoration: underline;
}

a.otherlinks:link, a.otherlinks:visited, a.otherlinks:active {
color: #090;
text-decoration: none;
}

a.otherlinks:hover {
color: #0f0;
text-decoration: underline;
}HTML


<a href="text.html" class="theselinks">linky</a>
<a href="text.html" class="theselinks">linky</a>
...
<a href="text.html" class="otherlinks">linky too</a>
<a href="text.html" class="otherlinks">linky too</a>