Reputation: 141
so I have two sets of links in an HTML document. Most of them (any normal link showing up on the site) have been set to my desired color, but I want four of them to have a different color and hover color than the others.
I set <a class="other" href="/">different link</a>
on those links in my HTML and
a.other { color:fff; }
a.other:hover { color: #8741ff; }
in my CSS, but the links of .other
are still showing up like all the rest.
Is there a way to rectify this?
Thanks. :)
Upvotes: 0
Views: 61
Reputation:
a.other:link,
a.other:visited {
color: #ffffff;
}
a.other:hover,
a.other:focus {
color: #ffcc00;
}
I think that should do it. You have to use the pseudo-attribute of the link element a.classname:link I guess. And yes, you omitted the hashtag.
Upvotes: 1