• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 432
  • Last Modified:

fix table headers

Hi,

I have a table and i would like to fix the table header using javascript. Can anyone help with good script that is easy to use and works in all browsers?

Thanks
0
Techsavy
Asked:
Techsavy
1 Solution
 
BardobraveCommented:
What do you mean by fix headers?

If you mean that you want to have table headers on a fixed position while table rows scroll up and down you don't need to use javascript, just create a table with the headers and other with the rows, each one included inside a <div>. Add row's div a overflow:auto css attribute et voilá.

Keep in mind that the apparition of the scrollbar would displace a bit your rows, so give your row's div a bit of extra space in anticipation.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now