4 ms·
That’s when you add position: sticky to the relevant row. Search for “sticky table header” for the proper CSS incantation.
by chuckadams 2y ago
That’s when you add position: sticky to the relevant row. Search for “sticky table header” for the proper CSS incantation.
- hyperman1 2y agoI tried. I think the scrollbar bled into the header at this point. Update: I remember now: The rows were drawn on top of the header. Their background must have been transparent or something.
- bruce343434 2y agoMaybe you could set the Z-index
- chuckadams 2y agoUnless other items it’s colliding with also have explicit z-index, there’s no need to mess with it, just make sure the background is opaque.
- hyperman1 2y agoI tried both: added multiple variations of z-index: and background-color:. There must have been something else in there neutering these. I didn't see it in the developer console. Now you all must be right: This must have been fixable somehow. Now the application contains 10+ years of CSS evolution, maintained by at least 4 predecessors and a bunch of quick and dirty maintenance hacks. It's a huge tower of exceptions built on exceptions . I had already blow way past my time budget for something I had estimated easy, and creating a table wasn't even the core of the job. So I cut my losses.
- TheTxT 2y agoBut now what do you do when you want a sticky footer too?
- chuckadams 2y agoThe same trick works for footers, just use bottom:0 instead of top:0
- TheTxT 2y agoI will have to try this, thank you :)