- Beranda
- Komunitas
- Tech
- Website, Webmaster, Webdeveloper
Share - membuat table HTML Fixed Header
![badycool](https://s.kaskus.id/user/avatar/2009/11/05/avatar1185360_2.gif)
![Avatar border](https://s.kaskus.id/images/avatarborder/1.gif)
TS
badycool
Share - membuat table HTML Fixed Header
Banyak yg request + nyari cara buat fixed header Table di HTML...
untuk yg belajar html , ini ane kasih code nya .
Output :
![Share - membuat table HTML Fixed Header](https://dl.kaskus.id/s13.postimage.org/rv6jqaxvr/tabel_fixed_header.jpg)
![Blue Guy Cendol (L) emoticon-Blue Guy Cendol (L)](https://s.kaskus.id/images/smilies/smilies_fb5ox6pblpkt.gif)
untuk yg belajar html , ini ane kasih code nya .
PHP Code:
<table style="width: 500px;height: 200px;border-collapse:collapse;" border="1">
<thead>
<tr>
<th>Judul1</th>
<th>Judul2</th>
<th>Judul3</th>
<th>Judul4</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="4">
<div style="max-height: 200px;width:100%;overflow-y:auto;overflow-x:hidden;" >
<table style="height:300px;width:500px;border-collapse:collapse;">
<tbody>
<?php foreach(range(1,10) as $i): ?>
<tr >
<td style="border-left:1px solid white;border-right:1px solid grey;border-bottom:1px solid grey;">td1 </td>
<td style="border-right:1px solid grey;border-bottom:1px solid grey;">td2</td>
<td style="border-right:1px solid grey;border-bottom:1px solid grey;">td2</td>
<td style="border-right:1px solid grey;border-bottom:1px solid grey;">td2</td>
<?php endforeach;?>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
Output :
![Share - membuat table HTML Fixed Header](https://dl.kaskus.id/s13.postimage.org/rv6jqaxvr/tabel_fixed_header.jpg)
![Blue Guy Cendol (L) emoticon-Blue Guy Cendol (L)](https://s.kaskus.id/images/smilies/smilies_fb5ox6pblpkt.gif)
0
2.9K
8
![Guest](https://s.kaskus.id/user/avatar/default.png)
![Avatar border](https://s.kaskus.id/images/avatarborder/1.gif)
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Urutan
Terbaru
Terlama
![Guest](https://s.kaskus.id/user/avatar/default.png)
![Avatar border](https://s.kaskus.id/images/avatarborder/1.gif)
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Komunitas Pilihan