unhappy_mage
[H]ard|DCer of the Month - October 2005
- Joined
- Jun 29, 2004
- Messages
- 11,455
This isn't exactly the same thing, but it works for me. It creates a box that scrolls and keeps the data in it, and places the header over that. This only works in Firefox; I haven't found a way that works with IE and firefox. You'll need to put <th> tags around the <tr> tags with the header class, rather than <tbody> around the whole table. Then add this code:
The first bit sets up scrolling, then the second bit turns it off for IE, since it breaks horribly. Hint: I asked for the body to be 600 pixels tall, not the rows!


Code:
<style type="text/css">
table.scrollable{
margin-right:16px !important;
}
table.scrollable tr.header{
position:relative;
}
table.scrollable tbody{
height:600px !important;
margin-right: 16px;
overflow:auto;
}
</style>
<!--[if IE]>
<style type="text/css">
table.scrollable tbody{
height: auto !important;
}
</style>
<![endif]-->

