1
I own the table
below would like to make a scroll on it and pin to thead
rolling down.
HTML code so far:
<div class="row">
<div class="TableCSS">
<table>
<thead>
<tr>
<th>Cnpj</th>
<th>Cliente</th>
<th>QtDiasUltMovimento</th>
<th>Titulos vencidos não pagos</th>
<th>Valor do Frete do Mes Anterior</th>
<th>Valor do Frete do Mes Atual</th>
</tr>
</thead>
<tbody>
//foreach
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
//end foreach
</tbody>
<tbody>
<tr>
<td><b>Total:</b></td>
<td></td>
<td></td>
<td></td>
<td><b></b></td>
<td><b></b></td>
</tr>
</tbody>
</table>
</div>
</div>
CSS code:
.TableCSS table {
font-size:12px;
color:#ffffff;
width:100%;
border-width: 1px;
border-color: #a9a9a9;
border-collapse: collapse;
zoom: 100%;
text-align:left;
}
.TableCSS th {
white-space: nowrap!important;
font-size:12px;
background-color:#ffffff;
border-width: 1px;
padding: 3px;
border-style: solid;
border-color: #a9a9a9;
text-align:left;
padding-bottom: 0px;
padding-top: 0px;
font-style: italic;
}
.TableCSS tr {
background-color:#ffffff;
padding-bottom: 0px;
padding-top: 0px;
text-align:center;
}
.TableCSS td {
font-size: 12px;
border-width: 1px;
padding: 3px;
border-style: solid;
border-color: #a9a9a9;
text-align:left;
background-color: #ffffff;
padding-bottom: 0px;
padding-top: 0px;
color: black;
}
Possible duplicate of Fix first row table
– hugocsl
The two theads?
– Sam
Only one, but if you can fix the bottom one at the bottom too.
– KevinF
And why exactly are there two
thead
on the table?– Woss
My mistake, I edited the question see if you can understand better.
– KevinF