3 ms·
”z-index: 10000” is a solution employed by people who have no idea what a stacking context is, and, consequently, do not know that one can define their own ”top
by eurasiantiger 4y ago
”z-index: 10000” is a solution employed by people who have no idea what a stacking context is, and, consequently, do not know that one can define their own ”top layer” and have z-indexes inside that work completely separate from the rest of the document.
Just set ”position: relative” on an element and it will start a new stacking context, and stack it within the underlying context. It’s like having a card in a card stack be another stack of cards.
- cyral 4y agoI don't blame them when the rules for what creates a stacking context look like this: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positio...