overflow value other than
visible and no height is the enemy of child elements with
position: sticky;. It’s like that element is ready to stick when the parent scrolls, but it never does because the height is unconstrained. …
position: relativecreates a new context for absolute positioning within an element? Well,
position: stickyis a locally scoped version of
position: fixed. Let's take a look at how that works using a modal with a sticky close button as an example.