Domanda

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;}
È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top