Problem with responsive datatable with fixed column width
Problem with responsive datatable with fixed column width
if I set all columns expect one or two to specific width and set datatable as response, and resize window,
all columns with predefined width stay with their width and if there is no space for them they hide,
but columns without width, change their width until 0 and whenever some other column hide they (column without width) show again.
So my question is, is it possible to set min-width to column, which has no specific width ?
this is initial state (width 1300px)
https://drive.google.com/file/d/0BwOr1sXLzHm3ckQzeFkwT1duX1E/view?usp=sharing
after a little resize window (width 1090px)
https://drive.google.com/file/d/0BwOr1sXLzHm3cXhkM1FNcU1vUVU/view?usp=sharing
and the last one (width 1000px)
https://drive.google.com/file/d/0BwOr1sXLzHm3YkwxWUdHaldEZW8/view?usp=sharing
Answers
I get the impression you might have used
table-layout: fixed
, although without a test case I can't say for sure. If that is the case you could use CSS to set a min-width I think.Allan
here is a sample
https://jsfiddle.net/vaL7y304/
Thanks - you are using
table-layout: fixed
. Did you try setting a min-width?Allan
yes, I tried to add min-width on "Info" column but it's not helping
It looks like (Chrome at least) is just ignoring the min-width on the browser column. Here is an example without DataTables: https://jsfiddle.net/vaL7y304/1/ (you need to make the output view fairly wide to see the Info column).
I'm not sure what DataTables can do here in that case I'm afraid.
Allan