Fixed Header plugin broken when table has a margin
Fixed Header plugin broken when table has a margin
svivian
Posts: 13Questions: 0Answers: 0
Pretty simple situation here - I'm using the FixedHeader plugin on a long table, but the fixed header row doesn't appear over the real header row: http://i.imgur.com/M3wLT.jpg
After delving into it, the problem is the top margin on the table. The fixed header is moved down exactly the number of pixels of the margin. If I remove the table's margin, the header goes to the right place. I tested on the sample page and the same thing happens.
EDIT: also running into a problem if the table columns change. On one page I hide the images (for faster loading) but have a button to show them (added via Javascript). But the fixed header doesn't refresh itself - the table moves up a line (because the button is removed) and the first column widens but the fixed header doesn't change with it.
Scrolling the page fixes the position and a column sort fixes the width - so perhaps there is some way to force the fixed header to redraw itself?
After delving into it, the problem is the top margin on the table. The fixed header is moved down exactly the number of pixels of the margin. If I remove the table's margin, the header goes to the right place. I tested on the sample page and the same thing happens.
EDIT: also running into a problem if the table columns change. On one page I hide the images (for faster loading) but have a button to show them (added via Javascript). But the fixed header doesn't refresh itself - the table moves up a line (because the button is removed) and the first column widens but the fixed header doesn't change with it.
Scrolling the page fixes the position and a column sort fixes the width - so perhaps there is some way to force the fixed header to redraw itself?
This discussion has been closed.
Replies
Any other ideas?
Thanks for sharing it!