To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
The technical storage or access that is used exclusively for statistical purposes.
The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
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;
}