Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

datatable column header alignment issue

The issue is with chrome and IE. If we add scrolling option while making datatable the table header not aligned with the table. otherwise it is fine.

"scrollY" : 200, "scrollCollapse" : true, "sScrollX" : "100px",
like image 731
Ashwani Kumar Avatar asked Nov 29 '22 15:11

Ashwani Kumar


1 Answers

Hi we can solve the issue by adding our own custom scrolling facility.

  • steps:)

    1. remove the scroll options while making datatable.
    2. wrap the table with div: $('#'+tableId).wrap("<div class='scrolledTable'></div>");
    3. give css property for scrolledTable class.

    .scrolledTable{ overflow-y: auto; clear:both; }

    1. Finish.
like image 120
Ashwani Kumar Avatar answered Dec 05 '22 18:12

Ashwani Kumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!