click link below a higher z-index div
55,507
The CSS method to do this is pointer-events: none
See: http://jsfiddle.net/LNwHV/1/
Browser support: http://caniuse.com/pointer-events (works everywhere except IE10 and older)
To support old versions of IE, you'll have to use JavaScript as a fallback.
Author by
Eric Fortis
Updated on May 01, 2020Comments
-
Eric Fortis about 4 years
Possible Duplicate:
Passing mouse clicks through an overlaying element <div>Is it possible to click the link below the red square without javascript? The red div doesn't need to be clickable.
http://jsfiddle.net/efortis/LNwHV/
#bottom{ width: 100px; height: 100px; background-color: orange; } #top{ width: 50px; height: 50px; position: absolute; left:0; top:0; background-color: rgba(255,0,0,.5); }
-
wouterds over 11 yearsThen it's not a solution. Doesn't even work in IE10.
-
thirtydot over 11 years@WouterDS: Yeah, it's rather annoying that it doesn't work in even IE10. Unfortunately, it's all CSS has to offer. If you need to support IE, you'll probably have to use JavaScript as in the last link in my answer.
-
TetraDev over 3 yearsNo one cares about IE anymore, lol. It's dead.