DEV Community


Discussion on: The CSS Position Property Explained - with Examples

afif profile image
Temani Afif

Sticky deosn't always stick to the viewport but to the nearest ancestor having a scrolling box. A bit trick as concept (related: In other words, it's the first ancestor with overflow different from visible (that's why overflow:hidden is a hassle for sticky, also related:

christiankozalla profile image
Christian Kozalla Author

You're absolutely right! I didn't know how to phrase it simply, so I omitted the fact..