Shrinking table to minimal width (autoWidth: true not working)
Shrinking table to minimal width (autoWidth: true not working)
yet
Posts: 43Questions: 17Answers: 1
I am generating a DT from existing HTML markup. All columns have the same width although autoWidth: true
is set. The DataTable() constructor does not contain any column specific width specs for the columns.
So how can I shrink the table width to its minimal width?
This discussion has been closed.
Answers
The DataTables CSS contains
width:100%
for the table. You would need to remove that from the CSS.Allan
You're correct with the
width: 100%
rule coming from the CSS however overriding the width usingdoes not help at all.
It seems to work quite well here: http://live.datatables.net/bacipuxi/1/edit .
Perhaps you can modify the test case to show me the issue?
Thanks,
Allan