I have the image hover working properly, but it only changes color once it's hovered over. Like, I want the div once hovered, it'll change the image.
I don't want to hover over the image itself and it only changes, which is what it's doing.
HTML:
<div class="navigation-box">
<div class="sidehead"><i class="lock"></i>header 1</div>
<div class="navLinks">
<ul class="">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</div>
</div>
CSS:
.lock {
background: url('../images/lock.png') no-repeat center;
display: inline-block;
width: 30px;
height: 30px;
text-align: center;
vertical-align: middle;
margin-top:-5px;
margin-left:5%;
}
li:hover .lock{
background: url("../images/lock-hover.png") no-repeat center;
}
In the fiddle, you'll see what I'm talking about. I simply want the div sidehead
once hovered over, to change the lock
image. Any ideas what it is that I'm doing wrong?