4 ms·
Sticky page headers are easy to implement and bad for UX. On the contrary, sticky table headers would be really helpful for long tables and it is impossible to
by janci 7y ago
Sticky page headers are easy to implement and bad for UX. On the contrary, sticky table headers would be really helpful for long tables and it is impossible to implement them without compromises (fixed column width only, opaque background only or JS-only etc.)
- paol 7y agoThis is a real failure of browsers, by the way. The table HTML has all the semantic information necessary, browsers could use it to improve table usability (such as sticky headers) but none ever bothered to try.
- Andrex 7y agoDevelopers can opt into this with CSS now. th { position: sticky; top: 0; } I don't think it would have been reasonable to include/force such functionality at the spec level.
- DaiPlusPlus 7y agoUnfortunately this only works on `th` and not `table > thead` or even `thead > tr` which is annoying because things like `tr` backgrounds won’t be displayed which look ugly if you have cell spacing without a cell border.