Access elements behind a fixed element
*Note: This is technically a continuation of a previously posted protip *
.fixed-container {
position: fixed
}
A fixed
element or a container (an element with a fixed
position that acts as a container for children elements) will not allow you to access elements beneath it. Actually, almost all elements does this which becomes a problem on certain instances.
By simply setting the pointer-events
of an element to none
, this obviously makes the elementx beneath our fixed element accessible.
.fixed-container {
position: fixed;
pointer-events: none;
}
Written by Kier Borromeo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#