I've tried several methods to get a scroll bar from html table with a fixed header but had no luck. I think I need a solution where the header is somehow "attached" to the table body (rather than the typical nested table solution). Every solution I tried messes up the width of the header columns and the body columns. In other words they get out of synch and the columns of the header don't line up properly with those of the scrolling table. The widths of the headers and the columns vary from column to column.
Is there any way for me to achieve this? I'd rather not use javascript. Oh and I need this to work in IE as well.
Thanks
Update: It is pretty important for me to get this functionality. I need the fixed header for both column and row headers. So far no solution has worked properly. I considered making the headers separate tables, but this wouldn't work when scrolling since the headers would stay fixed.
It seems like there would be many use cases for fixed html headers so it is surprising to me that there is no adequate solution.
(oh and I tried the option suggested by opatut in the link, but it doesnt work in all browsers and I need this work in IE, firefox and chrome...if it doesnt work in ie6 thats OK).
Oh and if I must fix the column widths or row heights, thats ok too, I would just be glad to have a working fixed header html table (cross-browser).