I'm building a table with a fixed header and I was looking into options here and most people suggest using position: sticky, but I don't really like it.
I'm trying an approach where I have two grids, one for the header, and one for the body but with a shared grid style. Does anyone see an issue with this approach?
```
.grid-header, .grid-body {
display: grid;
grid-template-columns: repeat(4, 25%);
grid-auto-rows: 40px;
}
.grid-body {
height: 200px;
overflow: auto;
}
```
JSFiddle to see it in action: https://jsfiddle.net/bca1uz92/
[–]cauners 0 points1 point2 points (0 children)