It seems like it may not work with the Datatables library active. Also, chrome and edge can't stick the thead element, you have to target the elements instead.
@@BuildThatWebsite Very helpful video and code! Thank you very much. The sticky header code works for my table press tables in the Opera browser but not in Chrome. :(
@@BuildThatWebsite Hello! Thank you for the reply. I indeed used it on tr. In the code it's tr.row-1. In my tables the first row works as my table header but I'll try to change that now. Thank you for the tip and have a great weekend! :)
Hmm, I wonder if it's a browser support issue. Which browser are you using? One thing that can break sticky table rows is the overflow property. Trying setting the element to overflow: auto; and see if that fixes it.