We have all had a page with a table where the content is loaded dynamically and we don't have any idea of the number of rows. It becomes especially difficult when we want the header row to stay fixed while the rest of the content is scrolled. I found this trick that works in IE 5.5+ (untested in other browsers).
What this is doing is putting your table inside a DIV tag of fixed height (you can change this to fit your page - either % or px work best), but allowing for the content to be scrollable. Then the style added on the first TR tag instructs the browser to dynamically position that row at the top of the DIV regardless of the scrolling.
There is one important thing to note. The value in your cellspacing must match the value at the end of the expression in the TR style. If you don't specify a value in the TABLE for cellspacing it will default to 2. Play with it to see the different results.
This is very useful when using PHP, ASP, JSP that can generate exceedingly tall tables. The only slight defect is a visual blur that happens while scrolling. However that stops when the scrolling stops. Also be aware that if you have SELECT dropdown lists in the content of your table, they will be displayed above (in the z-order) the header row (a condition that exists in all browsers).