Datatables columns not resizing properly
Datatables columns not resizing properly
Tylerlee12
Posts: 8Questions: 5Answers: 0
Hi guys,
So my datatables table doesn't resize properly when the screen gets smaller. Is there any way to make rows automatically shrink as the screen gets smaller rather than the page creating an x-axis and y-axis scrollbar? Here's a test case illustrating my problem.
http://live.datatables.net/ducuboj/2/edit
And the debug data for the actual table in question on my page webpage: http://debug.datatables.net/urucag
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Your CSS is setting the tables container to a width fixed by pixels, not percentage.
Take a look at the flexible table example http://datatables.net/examples/basic_init/flexible_width.html
A table to be responsive is just a matter of how CSS styling is applied at different screen resolutions.
I swore that I tried that prior to posting this question, but lo and behold this fixed my issue..thank you!