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

I know it's not great for performance, but to get a sticky header and flexible column widths you can render two tables and contain one of them to show only the header which you can then wrap into a <div>, position absolutely to cover the top of the table and give position: sticky.


For sticky headers you can literally just put `position: sticky` on the thead now!

https://codepen.io/chriscoyier/pen/WNpJewq




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

Search: