Why Does CSS Position Sticky Stop Working Inside an Overflow Container?

Asked 5 days ago 42 views

0

I’m using position: sticky for a table header, and it behaves as expected until I put the table inside a scrolling panel. Then the header scrolls away instead of staying pinned.

The panel needs its own scrollbar, so removing the overflow rule is not really an option. Is there a common interaction between overflow and sticky positioning that explains this, or should I be looking at the parent elements’ heights and layout?

0 Answers


Write Your Answer