Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 4 .sticky-top changes to thead

since a few days .sticky-top class does not work anymore on thead tags. Last Week it just worked perfectly, now I came back and tried few things on my App and it stopped working. Anyone got an idea why?

<thead class="sticky-top>
 ...
<thead>

That just worked perfectly. Now I cannot use it anymore. I tested it with just divs and for divs its still working, but I get an electron-dom error that I cannot spawn a div as a child of an table and i cannot spawn thead/th as child of a div.

Cheers, Puschek

like image 453
Dominic M. Avatar asked Dec 05 '25 09:12

Dominic M.


2 Answers

For everyone that is interessted in this problem:

Somehow you cannot sticky-top directly on thead (I just wonder why it worked 1 week ago...) so you have to stick the elements to your <thead>. So just give every single <th> the .sticky-top class and it works without any problems.

Greetings

like image 102
Dominic M. Avatar answered Dec 07 '25 22:12

Dominic M.


I found out that .sticky-top does not work together with .table-responsive, in case you added that.

Here is a compromise solution