Misaligned Headers / Columns

Misaligned Headers / Columns

benrimmerbenrimmer Posts: 7Questions: 0Answers: 0
edited January 2012 in DataTables 1.8
Hello there,

Has anybody managed to fix a problem where the column headers are misaligned from the columns?

I am calling fnAdjustColumnSizes() in the fnInitComplete() function but this does not fix the issue. The problem is also made worse when a column is sorted on.

I am using an AJAX datasource so there is no data in the table to begin with. It looks as though the size of the columns is being determined by the data within the column headers.

TTFN
Ben

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    I've always had various issues with column sizing that I could never figure out. They are minimal when I use the css from the examples so I suspect it has to do with various styling changes I've made in other cases. It's usually "close enough" that I've never spent a lot of time trying to fix them or bring the issue up here.

    I'm mostly chiming in to let you know that you're not alone in this issue. I could maybe post some demos for Allan so he could take a look and see if he spots anything.
  • benrimmerbenrimmer Posts: 7Questions: 0Answers: 0
    I'm glad to know that I am not alone with this issue! Some of the size differences I am experiencing are 50px +. Even when there is only misalignment of a few px users still see that rather than the functionality provided by the table.

    This is the last issue I have to deal with now before a project is signed off but this is really getting in the way and begining to drive me a little crazy :-)
  • benrimmerbenrimmer Posts: 7Questions: 0Answers: 0
    Just noticed that this is only happening when the number of rows displayed exceed the space allowed by the height of the table thus causing the Y scroll bar to be displayed.

    Not sure yet if this is a usefull pointer to the root cause of the issue.
  • benrimmerbenrimmer Posts: 7Questions: 0Answers: 0
    .. maby not. I have just removed the sScrollY option so that the table can grow to accomodate the rows but still getting the misalignment when I go from 10 displayed records to 25.
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    If you could post a link to an example that would be really helpful. There are a lot of things that interact to result in the rendered column width - it isn't as simple as setting width:50px for a table. So yup - a link to a demo showing the issue will allow me to see what is going on!

    Allan
  • benrimmerbenrimmer Posts: 7Questions: 0Answers: 0
    Hi allen,

    Is it possible to send you a screen shot of the table? Its on an internal dev server at the moment.

    TTFN
    Ben
This discussion has been closed.