is it possible to reduce the table width?
is it possible to reduce the table width?
the datatables table looks good if set to 100% width in the table html tag, but sometimes there aren't so many columns and on a large screen, the data look a bit lost on such a wide table, so I'd prefer to set it to automatic width ... but when I comment out the 100%, the header and the data of the table get out of sync, and the resulting table is completely garbled.
Apparently this only happens when the table fits on the screen in its entirety and horizontal scrolling is not necessary - when I output the table on a narrow screen and horizontal scrolling is necessary, the table looks good.
This question has an accepted answers - jump to answer
Answers
Can you link to a page showing the issue so it can be debugged please.
Allan
URL/password sent via PM
Super - thanks for the login details.
The issue comes from this CSS style:
which is in the DataTables stylesheet. The reason it doesn't appear to effect the header is that that element is wrapped in a container which has a specific width set, which the body element doesn't have.
To fix try adding the following to your CSS:
Allan
wonderful thank you !!