Lock Header for HTML Table

Posted on 2004-11-26
Last Modified: 2008-02-01

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.
Question by:ankuratvb
    LVL 16

    Accepted Solution

    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:
    LVL 9

    Expert Comment

    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.


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
    Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now