1
I’m trying to get the thead
table keep position: sticky
, so always stay at the top of the scroll, but it’s not working and I can’t find a solution.
NOTE: I am using Bootstrap and the class sticky-top
didn’t work either.
html, body {
height: 100em;
}
thead{
position: sticky;
position: -webkit-sticky;
top: 0;
background-color: lightblue;
}
<table border="1">
<thead>
<tr>
<td >CLIENTE</td>
<td>SEGMENTO</td>
<td>STATUS</td>
<td>ATIVAÇÂO</td>
<td>EC</td>
<td>ESTADO</td>
<td>CIDADE</td>
</tr>
</thead>
<tbody>
<tr>
<td>client</td>
<td> client</td>
<td> client</td>
<td> client</td>
<td> client</td>
<td> client</td>
<td>client</td>
</tr>
<tr>
<td>client</td>
<td> client</td>
<td> client</td>
<td> client</td>
<td> client</td>
<td> client</td>
<td>client</td>
</tr>
</tbody>
</table>
Work, work... Just use Firefox.. hahahaha
– fernandosavio
rs.. forgot to mention Chrome.
– Sam
The worst thing is that it only works in Firefox and Safari... I can’t even say that this is compatibility. hahaha
– fernandosavio