position sticky does nothing inside overflow hidden
I have a sticky sidebar (position: sticky; top: 16px) inside a main container. The container has overflow-x: hidden to stop horizontal scrolling from a wide table. Now the sidebar does not stick at all, it just scrolls away. If I remove overflow-x: hidden sticky works but the page gets a horizontal scrollbar. Chrome 126. Why do these two fight? This one has bitten me more than once.
4 replies