Header columns not aligned

Header columns not aligned

geebeetoogeebeetoo Posts: 26Questions: 6Answers: 0

First, I want to thank you for such a wonderful tool DataTables is! Awesome work!

This is my first time trying to us it. I have dynamically created tables from PHP. The number of columns and actual columns vary each time including the contents and the width.

I would like to apply the fixedColumns and fixedHeader to my tables.

PROBLEM:
The column width in the header do not align with the column width in the body. The column width in the body are correct.

This problem occurs as soon as I apply scrollY and/or scrollX. Even before I apply fixedColumns and fixedHeader.

However, as soon as I click on any header columns (as if to sort) the column widths in the header properly adjust.

I have created a jsFiddle. Yet it doesn't always behave the way it does in my app. Furthermore, in the attached fiddle, the first time it loads it loads it the way I see it in my app (not aligned) but if you click on Result again it aligns the columns! :s

jsfiddle.net/geebeetoo/upvdysjx/5/embedded

Answers

  • geebeetoogeebeetoo Posts: 26Questions: 6Answers: 0

    OMG!
    This is now working:

    The problem is I had the "Inspect" window opened in Chrome!! When I close it, everything works just fine.

    False alarm. Sorry about that!

  • allanallan Posts: 63,208Questions: 1Answers: 10,415 Site admin

    Hi,

    I just replied to your PM before seeing your second comment here. Odd that it works with the inspector shown - that shouldn't make any difference! My guess is that it is something to do with the width of the screen, but I'd need to be able to see the error happen to be certain.

    Thanks,
    Allan

This discussion has been closed.