DataTables fixed headers misaligned with columns in wide tables

前端 未结 21 1616
悲&欢浪女
悲&欢浪女 2020-11-30 19:23

Problem

When using the sScrollX, sScrollXInner and/or sScrollY to achieve a fixed header table with its inner content scroll

21条回答
  •  天涯浪人
    2020-11-30 20:06

    I had this very same problem and seen a lot of complicated answers that never seemed to work. I did solve it by simply overriding the CSS (site.css) on the following and it fixed it in Chrome, IE, and Firefox:

    table.display td {
    padding: 0px 5px;
    }
    /* this is needed for IE and Firefox if using horizontal scroll*/
    table{
        max-width: none;
        min-height: 0%;
    }
    

    This overrides the CSS in datatable.jui.css

提交回复
热议问题