Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1497
  • Last Modified:

Lock Header for HTML Table

Hi,

I have a report which is displayed as a html table.

What i wanted was that the table header i.e .the first row should be locked i.e. fixed.

The scrolling should be on the subsequent rows only so that the user can always see the table header.

I thought of frames initially,keeping the header in a separate frame.

But if i use that,taking a printout of the report would be cumbersome,as the print would be of the current frame only and that wouldnt contain the header.

Pls Help.
Thanx.
0
ankuratvb
Asked:
ankuratvb
1 Solution
 
muzzy2003Commented:
There's no inherent way to do this using CSS attributes or anything for different table elements, but have a look at the JavaScript in this link:

http://www.codeproject.com/jscript/scrollable_table.asp
0
 
jmelikaCommented:
You might also want to consider exporting your report into Excel.  It's very easy using ASP.  But of course it all depends on your enviornment and what's best for your users.

JM
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

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