1

I want to have the headers of this html table fixed, so as I scroll down and the headers remain static.

My table header HTML:

<table style="width: 425px; height: 4810px;" border="0">
<tbody>
<tr class="tableizer-firstrow">
<th colspan="3">
<div style="text-align: left; text-color: #00A599;"><span style="color: #00a599;">SEPTEMBER 2011 Anniversaries</span></div>
</th>
</tr>
<tr>
<th class="style1" style="text-align: center" width="143">Employee</th><th style="text-align: center" width="137">Department</th><th style="text-align: center" width="92">DOH</th><th width="49">Years</th>
</tr>
<tr>
3
  • Not sure what you are asking. Commented Sep 2, 2011 at 13:39
  • What is it that you are trying to achive? Give us some more detail and we can help :) Commented Sep 2, 2011 at 13:40
  • I want to have a table that will scroo down which currently does, but I want to keep thje headers static , freeze. Commented Sep 2, 2011 at 14:12

2 Answers 2

2

Guessing from your question that you want fixed headers?

Take a look at the jQuery Scrollable Table Plugin if you can use jQuery in your solution.

Sign up to request clarification or add additional context in comments.

1 Comment

I am using Joomla , the table is inside an article , meabe CSS, or Javascript would do..?
0

You could separate the table from the header and have 2 tables, 1 with just the heading. Then for the content table you could put it in a DIV, and use CSS to make it scrollable.

http://jsfiddle.net/cm3Wu/

However you would have to manually assign widths to the TD elements since the header is split.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.