Is there a way to change the color of a link when hovering over the entire div it's in, rather than just the link itself? Can this effect be achieved using only HTML & CSS?
For instance, if I had (jsfidde), how could I make the link turn blue when hovering over the gray area and not the actual link?
<style>
#parent {
background-color: gray;
height: 100px;
width: 200px;
}
#parent img {
margin: auto;
line-height: 90px;
}
#caption a {
text-decoration: none;
color: black;
}
#caption a:hover {
color: blue;
}
</style>
<div id="parent">
<img src="http://www.cedexis.com/images/icons/32-social.png?1389641973" />
<div id="caption"> <a href="jsfiddle.net">This is a caption</a>
</div>
</div>