IT.COM

Stop the table header from scrolling?

Spaceship Spaceship
Watch
I have a scrollable table javascript that I am using. I would like to know how I can keep the header from scrolling out of view. I would like to make it fixed.

How can I do this??
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
A good first step would be to either post a link to the site, or some of the code.
 
0
•••
Thanks, here it the basics.
<script type="text/javascript" src="tablesort.js"></script>

<div STYLE="height: 500px; width: 960px; font-size: 12px; overflow: auto;">

<table id="test1" cellpadding="0" cellspacing="0" border="0" class="sortable-onload-5-6r rowstyle-alt colstyle-alt no-arrow">

<caption>Last Update (2010-12-20)</caption>
<thead>
<tr>
<th class="sortable-numeric">Contact</th>
<th class="sortable-numeric">Phone #</th>
<th class="sortable">Supplier</th>
<th class="sortable-date-dmy">Email</th>
<th class="sortable-currency">City & State</th>
<th class="sortable-numeric">Ships Internationally</th>
<th class="sortable-numeric">eBay Sales</th>
<th class="sortable-currency">Amazon Sales</th>
<th class="sortable-currency">Dropship Fee</th>
</tr>
</thead>
<tbody>

<tr>
<td>wrfrv</td>
<td class="lft"><a href="http://www.frtyyhgty.com">test</a></td>
</tr>

<tr class="alt">
<td>wrfrv</td>
<td class="lft"><a href="http://www.frtyyhgty.com">test</a></td>
</tr>


</tbody>

</table>
</div>
</div>

Here is the exact table I'm using except I have added the scrollable feature. http://www.ajaxdaddy.com/demo-table-sort.html This table also sorts by category. I just need to figure out how to make the header not scroll. Thanks
 
0
•••
I have a scrollable table javascript that I am using. I would like to know how I can keep the header from scrolling out of view. I would like to make it fixed.
 
0
•••
Back