3 ms·
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
by methyl 5y ago
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.
- madeofpalk 5y agoFor sticky headers you can literally just put `position: sticky` on the thead now! https://codepen.io/chriscoyier/pen/WNpJewq https://codepen.io/chriscoyier/pen/WNpJewq