l_p1sg
Last Updated: February 25, 2016
·
382
· srph

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;
}