Search code examples
datatableheaderalignment

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",

Solution

  • 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.