Table column headers misalinged when in jquery.tabs & sScrollX set

Table column headers misalinged when in jquery.tabs & sScrollX set

rootnoderootnode Posts: 2Questions: 0Answers: 0
edited November 2013 in General
I use jQuery tabs with datatables.net. I have set sScrollX: 100%.

The column headers of the table in the 2nd tab are misaligned with the body.
This is not the case with table in the 1st tab.
In the 3rd tab, col headers are fine since I'm not using sScrollX there.

My fiddle of the problem here:
http://jsfiddle.net/uzNt5/8/

Should I initialize the table differently when using jQuery.tabs in order to align the columns correctly?
Thanks for any input.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    See this example: http://datatables.net/release-datatables/examples/api/tabs_and_scrolling.html .

    In short you need to call fnAdjustColumnSizing when he table is made visible.

    Allan
  • rootnoderootnode Posts: 2Questions: 0Answers: 0
    Wow, works now like a charm:
    http://jsfiddle.net/uzNt5/11/

    Thank you Allan!
This discussion has been closed.