Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

Table header width not aligned with body width

$
0
0

I'm having a problem getting the table headers to align over the columns when a table is initialized in a DOM node that is hidden - specifically within a tabbed interface when the table is on a hidden panel. The header tds have their widths set to 0 within the style attribute. I assume this is due to a parent container's width being unknown.

I tried resolving this problem by calling:

table.columns.adjust().draw()

after the table is visible with no luck.

I've also tried the answers found to this stackoverflow question to no avail.

Is there an accepted method to get the column headers to resize themselves so that they are the same width as the table columns?

This seems to be a matter of some interest since the above SO question has over 67,000 views and was active as recently as today.

Thanks.


Viewing all articles
Browse latest Browse all 2364