mkoryak/floatThead

Replacement thead height height larger than original

deep42 opened this issue · 8 comments

Don't know if there is a specific problem on my end, but the replacement thead for the original table has a bigger height than it should. In my case thead has 24px, but the actual th, that has no borders, just padding, has 20px.

So, I changed the following variable in setHeaderHeight():
var headerHeight = $header.find('th').outerHeight(true); (instead of $header.outerHeight(true))

In initially thought to keep the bigger height, because it looks better, so I added the following line in the same function:
$floatTable.find('thead > tr').height(headerHeight);

please post an example of this bug to jsfiddle. I need to see the bug in order to fix it.

also, are you using inline styles on the table elements? if so, you should change it to use css selectors and use the table's class in them (add one if needed)

No inline styles. See http://jsfiddle.net/V9Fpn/.

It might not be a bug, just something CSS related, but I just wanted to let others know I encountered this scenario and what I did to get around it.

Seems to be a bug. I have a fix for it in the next release which is not officially out but you can see that it works:

http://jsfiddle.net/V9Fpn/1/

Thanks for letting me know about it.

this should be fixed in latest version

Thank you. All the best.

Please try this. It's worked for me

  var $table = $('table.table-wages');
        $table.floatThead({
            scrollingTop: 0,
            useAbsolutePositioning: false,
            scrollContainer: function($table){
                return $table.closest('.table-wages-container');
            }

        });

// try to resize table thead. tr
$(".size-row,.floatThead-col").css("height", '48px');

lock commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.