Bad header alignment when ScrollY is Activated

Bad header alignment when ScrollY is Activated

prox108prox108 Posts: 27Questions: 12Answers: 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: 21,453Questions: 26Answers: 4,975

    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: 63,692Questions: 1Answers: 10,500 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: 21,453Questions: 26Answers: 4,975

    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: 27Questions: 12Answers: 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.