I have the following code:
CSS:
<style>
div.testy {
border:1px solid black;
}
div.testy:hover {
background-color:red;
}
</style>
HTML:
<div class="testy" style="height:100px;
background: url('down.png') no-repeat; background-size:contain;">
aa
</div>
'down.png'
is an image with a transparent background. What I wanted to do was have the color of the background change while still keeping the image in front of the color.
The previous code does almost everything right, except that when I hover the mouse over the div
, nothing happens.
QUESTION: Why might it be that the hovering and the background color change are not working?
Here is a jsfiddle link with the problem happening: https://jsfiddle.net/sdsze2fv/