"Table fixed row header"
Bootstrap 3.3.0 Snippet by GuilhermeCipriano

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<h2>Table fixed row header</h2>
</div>
<table class="table table-fixed table-striped" border="1px";>
<thead>
<tr>
<th>Posição</th>
<th>Pontos</th>
<th>Nome</th>
<th>Instituição</th>
<th>Ano Escolar</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>720</td>
<td>José</td>
<td>Instituto Federal Catarinense</td>
<td>quarto ano</td>
</tr>
<tr>
<td>2</td>
<td>675</td>
<td>Rodolfo</td>
<td>Almirante Boiteux</td>
<td>terceiro ano</td>
</tr>
<tr>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Se necessário, usar overflow para definir o tamanho da tabela*/
}
table {
width: 50%;
}
thead, tbody, tr, td, th {
display: block;
}
thead th {
height: 30px;
}
tbody td, thead th {
float: left;
width: 20%;
}
tr:after {
clear: both;
content: ' ';
display: block;
visibility: hidden;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: