Issue with scroll X,Y

Issue with scroll X,Y

toson1003toson1003 Posts: 11Questions: 3Answers: 0

I'm using datatable
But columns are deviation when set scrollX,Y
Please help me
Here is my test case

Thanks all


  • allanallan Posts: 49,474Questions: 1Answers: 7,275 Site admin
        // It returns 3 elements instead of 1 !
        var tables = document.getElementsByClassName('display');

    That is correct and expected. In order to get the table body to scroll without also scrolling the `-tag thead, the table is broken into three individual tables. The header, body and if there is one the footer. Javascript is then used to try an alignment.

    You have the column with the long string Donna Snider3333333333444444444444444444444444555555555555555555666666666666 set to be 10% width, which obviously isn't going to work, hence the misalignment.

    If you let DataTables calculate the widths for you, it does work: .


Sign In or Register to comment.