Question

Here is my code onmouseover on image under anchor tag highlighted color not changing please can I know what am doing wrong

 <div class="iconlink">
  <a href="/Classification/ClassificationLabel" title="Classification Label">
  <img src="/Content/Images/labels-72x72.png" /><div>Classification Label</div>
     </a>
    </div>

i tried with these types

.iconlink a:hover {background-color: #000000;
    color: #000000;0}

and

<div class="iconlink">
  <a href="/Classification/ClassificationLabel" title="Classification Label" class="hove"> 
<img src="/Content/Images/labels-72x72.png" /><div>Classification Label</div>
  </a>
   </div>
 .hove:hover{background-color: #000000;
    color: #000000;}
Was it helpful?

Solution

You need to apply background-color to your img in css like:

.iconlink a:hover img {
  background-color: #000;
}

.iconlink a:hover {
  color: #000;
}

FIDDLE

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top