Not sure if I understand your question correctly, but you can change the css white-space property for jQuery DataTable columns. If you change it to normal, text (in long columns) will be wrapped.
Add the example code below to your WordPress theme customizer to wrap your text. Be aware that you need to replace “your-table-name” with the table name for which you want to change the css white-space property.
Thank you for the tip.
This did not work:
#your-table-name.dataTable.nowrap td {
white-space: normal;
}
This worked for me:
table.dataTable.nowrap td {
white-space: normal !important;
}
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok
Hello,
I have database table with one large column. I see you using jquery dataTables, is it possible to limit the width just for one column.
Thank you,
Anatoly
Hi Anatoly,
Not sure if I understand your question correctly, but you can change the css white-space property for jQuery DataTable columns. If you change it to normal, text (in long columns) will be wrapped.
Add the example code below to your WordPress theme customizer to wrap your text. Be aware that you need to replace “your-table-name” with the table name for which you want to change the css white-space property.
#your-table-name.dataTable.nowrap td {
white-space: normal;
}
Hope this helps!
Good luck,
Peter
Thank you for the tip.
This did not work:
#your-table-name.dataTable.nowrap td {
white-space: normal;
}
This worked for me:
table.dataTable.nowrap td {
white-space: normal !important;
}