Hi everyone, I'm completely new to CSS so please bear with me as I try to explain my issue.
I'm attempting to create an image hyperlink using the .link class. I want the images for both .link and .picture to "change" when I hover over the hyperlink, while still keeping it clickable.
.picture {
background-image: url('imageB1.jpg');
width: 100px;
height: 100px;
}
.link {
background-image: url('imageA1.jpg');
width: 100px;
height: 100px;
}
.link:hover {
background-image: url('imageA2.jpg');
}
.link:hover+.picture {
background-image: url('imageB2.jpg');
}
<a href="destination.html">
<div class="link"></div>
</a>
<div class="picture"></div>
The issue I'm facing is that although .link is clickable, the picture does not change its background-image when I hover over .link. Any help would be greatly appreciated. Thank you!