Hi all,

I'm having some trouble implementing a fixed table header in Javascript with jQuery. Wondering if anyone has ever seen what I'm seeing and what they did to fix the problem.

First, the code is here: http://billf.org/work/tables/table.html

There's an external stylesheet, and all JS code is at the bottom of the HTML file.

Not only is this code broken, it's broken in one way in IE7, another in IE8, and still another in Mozilla/Webkit. I.e., three ways in total. I'm hoping that once the issue is solved, all the problems will go away.

OK. So if you scroll the webpage, the header row becomes sticky once the window's scrollTop is greater than the table's top offset, so that the column headers are still visible as the user scrolls down the page. The problem is that the overflow-x and text-overflow properties of the thead element are no longer respected once thead becomes fixed, and thus the header columns blow out and are no longer in line with the content beneath them.

Any help explaining what's going on, and how to get around it would be greatly appreciated.

Many thanks in advance!

--Bill