Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.)


This 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.


Developers 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.


Unfortunately 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: