Scrollable Table Keeping the headers always visible
I have a table which displays the data from a database. The <tr>
and <td>
a开发者_如何学编程re dynamically created using a for loop.
I want the data alone in that table to scroll with the <th>
always visible so that user can see the headers while scrolling through the data.
are you using thead? i think this should work .tbody{overflow:scroll; height:500px}
<thead> <tr><th>head1</th>....</tr> </thead> <tbody> <!-- create <tr><td>h1r1</td></td> --> </tbody>
精彩评论