Position: sticky not working? Check these four things, in this order
position: sticky not working? It's almost never the property. Four causes, a console snippet that finds the guilty ancestor, and fixes that survive the next refactor.
position: sticky not working? It's almost never the property. Four causes, a console snippet that finds the guilty ancestor, and fixes that survive the next refactor.
position: sticky not working? It's one of five causes: no top value, a clipping ancestor, a short parent, a stretched item, or html + body overflow. Fix each.
z-index not working even with a huge value? It's almost never a z-index bug — an ancestor is trapping your element in its own stacking context. Here's why, and the fix.
position: sticky refusing to stick? It's almost always one of four things: a missing offset, a clipping ancestor, a too-short parent, or a table element. Here's how to find which.
z-index not working even with a huge value? It's almost never a z-index bug — an ancestor is trapping your element in its own stacking context. Here's why, and the fix.