Mike van Hoof Mike van Hoof - 1 year ago 126
Javascript Question

DataTables - FixedHeader - multiple tr in thead alignment issue

Please see this page: http://live.datatables.net/fadoteba/1/

The problem I am having is that when I have a thead like this:

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

It screws up the alignment of the fixedheader, when I remove the first
with the th and the colspan it works like it should (also scroll down in the example to see this). what can I do to get this fixed, or what am I doing wrong?

Answer Source

Your problem is style of table. It sets table-layout property automatically on your table. I add below line to css to fix problem :

table {
   table-layout: auto !important;

Datatable Link

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download