DataTables-FixedHeader-多个tr in the ad对齐问题

DataTables - FixedHeader - multiple tr in thead alignment issue

本文关键字:ad 对齐 问题 the in 多个 tr DataTables-FixedHeader-      更新时间:2024-06-13

请参阅此页:http://live.datatables.net/fadoteba/1/

我遇到的问题是,当我有这样的问题时:

<thead>
    <tr style="background-color: #99b3ff">
        <th align="left" colspan="13">
            somelongnamehere-dsadsadsadsadsadsa<br />
            Total LPARs: 9<br />
            Planned LPARs: 0<br>
            <br>
            Free memory: 286 GB (excl planned lpars)<br />
            Total vCPU (incl planned): 21
        </th>
    </tr>
    <tr>
        <th width="100">Customer</th>
        <th>Frame</th>
        <th>LPAR</th>
        <th>CPU<br>Virtual</th>
        <th>Cluster</th>
        <th>Bubble</th>
        <th>ProcPool</th>
        <th>Mem (GB)</th>
        <th>Add<br>Mem (GB)</th>
        <th>Total<br>Mem (GB)</th>
        <th>Mem<br>overhead (GB)</th>
        <th>AME</th>
        <th>ReqID</th>
    </tr>
</thead>

当我移除第一个带有th和colspan的<tr>时,它会拧紧固定的读卡器的对齐,它的工作原理与它应该的一样(也可以在示例中向下滚动查看)。我能做些什么来解决这个问题,或者我做错了什么?

有点晚了,但我在这个问题上花了6个小时,直到我意外地发现了从CSS中删除表布局的解决方案,然后我在这里找到了这个解决方案!

.dataTable.fixedHeader-floating {
    table-layout: auto !important;
}

您的问题是表的样式。它会自动在表上设置表布局属性。我在css中添加以下行来解决问题:

table {
   table-layout: auto !important;
}

数据表链接