HTML CSS examples for CSS Layout:Fixed Position
CSS <td> position fixed with scrollbar
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .fixed_header {<!-- w w w.ja v a2 s .c o m--> table-layout:fixed; border-collapse:collapse; } .fixed_header td:nth-child(1), th:nth-child(1) { min-width:100px; } .fixed_header thead tr { display:block; position:relative; } .fixed_header tbody { height:61px; display:block; overflow:auto; } </style> </head> <body> <table class="fixed_header"> <thead> <tr> <th>Lorem </th> <th>Lorem ipsum d</th> </tr> </thead> <tbody> <tr> <td>L</td> <td>Lor</td> </tr> <tr> <td>L</td> <td>Lor</td> </tr> <tr> <td>L</td> <td>Lor</td> </tr> <tr> <td>L</td> <td>Lor</td> </tr> <tr> <td>L</td> <td>Lor</td> </tr> <tr> <td>L</td> <td>Lor</td> </tr> </tbody> </table> </body> </html>