DataTables header alignment issue (Refresh)

DataTables header alignment issue (Refresh)

pratik136pratik136 Posts: 1Questions: 0Answers: 0
edited November 2012 in Bug reports
DataTables version: 1.9
Browser affected: Chrome, IE(7/8/9)

When using the `sScrollX`, `sScrollXInner` and/or `sScrollY` to achieve a fixed header table with it's inner content scrolling, the headers of the table go out of alignment with the rest of the body in Chrome and IE(7/8/9). Firefox on the other hand displays them perfectly.

In the latest version 1.9.4, as far as I can tell, this issue only occurs when there is a lot of data with fluctuating widths, and with words that are very long/unwrappable combined in the same columns as small ones. Also the table in question needs to be reasonable wide.

All these factors are demonstrated in this fiddle:




Suggested Solutions

**These solutions have been suggested before but have had no effect** on my implementation. Owing to some of these suggestions, I setup a clean plain vanilla demo as I wanted to ensure that no other code was contributing to this effect.

* turn off all my css, the issue goes away
* `setTimeout( function () { oTable.fnAdjustColumnSizing(); }, 10 );`
* calling `oTable.fnFilter( "x",0 )` and `oTable.fnFilter( "",0 )` in that order
* `"sScrollXInner": "100%"`
* get rid of all widths

The only solution that I found to the misaligned headers was taking out `sScrollX` and `sScrollY`, but this can't be counted as a solution as you lose the fixed header/inner content scrolling functionality. So sadly it's a temporary hack, not a fix!

To edit/play with the latest fiddle:

I have tried various combinations which can be observed in the revision history of the fiddle by using the link `` where `1 <= #REV# <=12`

This issue ha also been flagged on the DataTables forum:


This question has been asked before:
but the vital difference is that the OP of that question mentioned that they were able to fix the issue if all CSS was removed, which is untrue in my case, and I have tried a few permutations, thus thought the question worthy of a repost.

This issue has driven me nuts! Please contribute your thoughts!
This discussion has been closed.