开发者

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>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜