4 ms·
There's a limitation to `position:sticky;` though, which is that it will not work inside of ANY parent that's `overflow:auto` or `overflow:hidden`. I hope this
by RheingoldRiver 5y ago
There's a limitation to `position:sticky;` though, which is that it will not work inside of ANY parent that's `overflow:auto` or `overflow:hidden`. I hope this gets addressed in a future version of the spec one day. Gtihub issue: https://github.com/w3c/csswg-drafts/issues/865 https://github.com/w3c/csswg-drafts/issues/865
The biggest issue that happens to me is that I'll have a large data table where I want `overflow-x:auto` with a sticky header, and this is just impossible without Javascript. Of course, the UX of such a table is not ideal, but sometimes nothing will substitute for a large data table when you have a lot of data that goes into a table and people want to see it.
- chadlavi 5y agoThe thead isn't a child of tbody anyway; you can just make tbody scrollable for this, no? Edit oh I missed the "x" there, I see.