Headers squished over to the left

Headers squished over to the left

mweissmweiss Posts: 2Questions: 0Answers: 0
edited March 2014 in General
I'm having a problem with DataTables shoving all my table headers over to the left. (I'm using scrolling and sorting.) The data values are just fine, though - lined up where I want them to be. When I click on a header to sort by that value, however, the header expands to match the data, and it looks fine. I've already tried putting "width: 100%" in the css for just the table headers, but it didn't work. I don't get it. Any suggestions?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    > Any suggestions?

    Yes - please link to a test case, as required in the forum rules! http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    It sounds like you are initialising the table when it is hidden. Use fnAdjustColumnSizing when you make the table visible. But that is purely a guess since I can't see it.

    Allan
  • mweissmweiss Posts: 2Questions: 0Answers: 0
    That was it! The reason I didn't give an example was I wasn't sure how to do it. I'll try harder next time.
This discussion has been closed.