I managed to get the headers moving now (forgot the 'px' suffix :S ) It does work as i wanted now, only thing is the alignment of the two table columns. It's about 2px off (per column..)...
Does anyone have any tips on how to get the two tables aligned in a better way? Thanks, Miel see attached zip for source -----Original Message----- From: [EMAIL PROTECTED] on behalf of Miel Soeterbroek Sent: Sat 3-2-2007 12:37 To: discuss@jquery.com Subject: [jQuery] scrollable table with fixed (but flexible :P ) headers Hey guys, I want to put a large data table in a (fixed-size) container div, to make it a scrollable table. Doing this for a fixed width table isn;t quite hard, but the width of my table is not fixed at all. I now have two divs, both containing its own table. Top div table contains one row (the headers) and the div is not scrollable. Bottom div ocntains the actual table and is scrollable. To make the two tables have the same col widths i get the width of the main table columns onload, and make the column widths of the second header match the main ones by using a spacer img (with a set width).. Not quite bulletproof but i don't know how else to do that... I am able to bind a scroll event to the main div, and fetch the pixels scrolled with the scrollLeft method in dimensions. Multiplying the scrollLeft value with -1 gives me the X offset for the table... But how can i set that x-offset? (using " .css('left',value)" doesnt seem to work at all)... Do i need to do this differently? Any help is appreciated, thganks. Here's a non jquery example to give u guys an idea: http://www.litotes.demon.co.uk/example_scripts/tableScroll.html (although i dont need the vertical hdr cells...) Don't have the code here, i can post some code once i get my usb mem stick if needed, and that'll be later today...
<<winmail.dat>>
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/