tbasallo
tbasallo
KPCKevin Powell - Community
Created by tbasallo on 3/8/2025 in #front-end
Grid Sticky Header/First Column
Does anyone know why and if there's a fix for a Grid/Flexbox layout with a sticky header and first column, that seems to work, but when scrolling horizonally, the header is only sticky for the original width of the viewport. This CodePen is a good example (from someone else here with a sticky header question): https://codepen.io/AnaZG1509/pen/xxJbjzV If you make the viewport small enough, you'll see that it moves after two columns' width worth of scroll. I can't seem to get a grid/flexbox stickiness to work that doesn't suffer from this. My current solution is a table inside it's own grid container so that the header and first column correctly stay in place in the whole page (opposed to a fixed height container). But tables tables are not ideal for this (I am trying to build a scheduler)
23 replies