How to scroll only the HTML table data keeping header in position?

If i have a HTML table with header and large data, when the user scrolls down the data, the header is out of screen and it is confusing to identify which data corresponds to which header. How can I fix the header and provide scrolling for only the data so that when the user scrolls down, the header information is still available on the screen.

i always have used percentages instead of pixel width, that way it's fixed on the browser, from what I read from your question, your data goes across the screen, correct? just use in your table tab something like...
<td width="100%" height="20">

if that doesn't work, have you thought about using frames? you can set frames without the scrolling bars on the top, check out this site

There are two ways to accomplish this. One is using frames. The other involves a technique similar to a "watermark". Check out www.brainjar.com for the navbar (which scrolls down the page always staying at the top of the page) or www.webreference.com/dhtml (look for the article which deals with watermarks).

Put the header for each column at the top in a separate frame to the table and then the table in a frame below it. The top frame will not scroll when the bottom one with the data in in does.
Good luck!

I think you may be happiest avoiding frames and would suggest a combination of the comment from limcuando with one extension. Place the header for your table in it's own positioned div, directly above the div for your table. This way the data will scroll in your within your div and the titles will stay fixed in their div, and no frames to boot.

First of all let me say that I am sorry you accepted an answer that will not work for you, perhaps CS may be able to help you out in that area. On the other hand, limcuando did give you half the answer and I do not think you will get the half for ns.

Even using NS's own CSS style generator I was not able to get a div with a table in it scroll, at all. I am using NS (the actual browser) and it will not work. You asked earlier about Browserola, well an emulator is a program that is supposed to give you an accurate representation of multiple browsers in a single program. However, unless the emulator handles EVERYTHING exactly as the actual broswer, it is only an approximation.

The code above working in the emulator but not in the actual browser is a prime example.

Deprecated and Headed for the Dustbin
By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems. This article discusses one of those, called register_globals. It is a thing you do not want. …

In this tutorial viewers will learn how to position items using CSS's three positioning types
Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5.
As we learned in our last micr…