Bad header alignment when ScrollY is Activated

Bad header alignment when ScrollY is Activated

prox108prox108 Posts: 18Questions: 9Answers: 0
edited June 27 in Free community support

Hi Guys, I have a problem using the ScrollY propiety:

When resize the window the header doesn't adjust with the table.

I share with you a link to show you an example:

https://live.datatables.net/kucuribu/1/edit

I use Datable 1.11.5 and Bootstrap 3.3.6.

I really think is some class from Bootstrap because when I change the clases that livedatable has as default on its tamplete, and only then, the problem appears.

Answers

  • kthorngrenkthorngren Posts: 20,991Questions: 26Answers: 4,887

    Add style="width:100%" to the table tag as shown in this example. Updated test case:
    https://live.datatables.net/kucuribu/2/edit

    Kevin

  • allanallan Posts: 62,858Questions: 1Answers: 10,344 Site admin

    For info DataTables 2.1 is going to add that style if there is no explicit width or style="width:..." attributes on the -tag table`. This footgun turns up a lot.

    Allan

  • kthorngrenkthorngren Posts: 20,991Questions: 26Answers: 4,887

    DataTables 2.1 is going to add that style if there is no explicit width or style="width:..."

    Very nice! Will be helpful and hopefully less forum questions.

    Kevin

  • prox108prox108 Posts: 18Questions: 9Answers: 0
    edited June 27

    It didn't work, I found out something rare and maybe the cause of the problem.

    Behind I think Bootstrap change some structure (creating new tags) and only worked when I also changed this to width:100%:

    Now I only need to find out how to change that after is created.

Sign In or Register to comment.