I have overlapping elements (images, to be precise), and I need them all to activate their respective hover effects if hovered over, even if they are not on top. I feel like this should be pretty straightforward. Am I missing something?
Here's a jsFiddle. I need red's hover effect to fire if touched even if that space is covered by green and blue.
#div1, #div2, #div3 {
position: absolute;
width: 100px;
height: 100px;
}
#div1 {
background-color: red;
}
#div2 {
background-color: green;
left: 25px;
top: 25px;
}
#div3 {
background-color:blue;
left: 50px;
top: 50px;
}
<div id="div1" onmouseover="alert('Red Div moused over');"></div>
<div id="div2"></div>
<div id="div3"></div>