Hallo Leute,
ich möchte gerne eine Tabelle dynamisch erzeugen.
Die Tabelle ist je nach Bedarf unterschiedlich lang. Jetzt möchte ich, dass diese Tabelle, wenn sie eine bestimmte Länge erreicht, scrollbar wird.
Beides funktioniert super....
Aber jetzt meine Frage ist es machbar die Kopfzeile zu fixieren und den restlichen Tabellenbereich zu scrollen? ( ähnlich Excel )
ich möchte gerne eine Tabelle dynamisch erzeugen.
Die Tabelle ist je nach Bedarf unterschiedlich lang. Jetzt möchte ich, dass diese Tabelle, wenn sie eine bestimmte Länge erreicht, scrollbar wird.
Beides funktioniert super....
Aber jetzt meine Frage ist es machbar die Kopfzeile zu fixieren und den restlichen Tabellenbereich zu scrollen? ( ähnlich Excel )
PHP Code:
<thead>
<tr >
<th scope="col">SP1 </th>
<th scope="col">SP2 </th>
<th scope="col">SP3 </th>
<th scope="col">SP4 </th>
<th scope="col">SP5 </th>
<th scope="col">SP6 </th>
</tr>
</thead>
<tbody>
<?php
foreach($blabla as $bla){
?>
<tr>
<td><?php echo $bla['SP1']; ?></td>
<td><?php echo $bla['SP1']; ?></td>
<td><?php echo $bla['SP1']; ?></td>
<td><?php echo $bla['SP1']; ?></td>
<td><?php echo $bla['SP1']; ?></td>
<td><?php echo $bla['SP1']; ?></td>
</tr>
<?php }?>
</tbody
Comment