The css style works, but the css link is not
Is there a reason why my bottom CSS is only half working?
div.share
{
position:relative;
top: -4px;
left: 25px;
font-family:Tahoma;
background-color:#000000;
font-size:11px;
font-weight:bold;
}
/* share link css */
a.share:active
{
color: #000000;
}
a.share:hover
{
color: #FFFFFF;
background-color:#000000;
text-decoration: none;
}
CSS div.share
works, but CSS for active
and hover
doesn't
+2
source to share
4 answers
Adding your html will make this easier.
I can only assume you have a tag <div>
with a tag class='share'
and no <a>
with the same.
For example, does your html look like:
<div class='share'>
<a class='share' href='http://yoursite.com'>Your site</a>
</div>
or
<div class='share'>
</div>
...
<a class='share' href='http://yoursite.com'>Your site</a>
If this is the first, then
div.share a:hover { ... }
will make more sense.
If it's the second then the selector looks great ... although it's better to choose different but appropriate class names.
+2
source to share