Reputation: 3
I'm trying to style one link on my page, which has the class=b2t
I want it to remain white at all times except when users mouse over it, in which case I want it to turn green.
I simply cannot figure out how to apply the hover and color properties to that one link within the class=b2t.
Can anyone advise me on this please?
<div id="container">
<div id="b2t">
<a class="b2t" href="#">
<img src="images/backtotop.png">
Back to top
</a>
</div>
</div>
Stylesheet:
a.b2t {
position: relative;
left: -50px;
text-decoration: none;
}
Upvotes: 0
Views: 103
Reputation: 5213
Try this:
a.b2t:link, a.b2t:visited, a.b2t:active {
color: #fff;
position: relative;
left: -50px;
text-decoration: none;
}
a.b2t:hover {
color: #0f0;
}
Upvotes: 2
Reputation: 815
I think you are looking for this.
Just add:
a.b2t:hover { color: Green; }
Upvotes: 2