问题
<table id="user">
<thead>
<tr class="theader">
<th>Order Id</th>
<th>Message</th>
<th>Date Created</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<script>
$("#user").dataTable({
"bFilter": false,
"bAutoWidth": false,
"bProcessing" : false,
"bServerSide" : true,
"sAjaxSource" : "./getOrderDetails.cpm"
});
</script>
Hi friends, here is my data-table. I want to implement word-wrap break word property to the message column so that long messages with out space will break. Can you please tell me how I should implement the word-wrap break word property to a column in the data-table.
回答1:
Add this class in your css.
#user tbody td:nth-child(2)
{
word-wrap:break-word !important;
}
来源:https://stackoverflow.com/questions/23715018/how-to-give-word-wrap-break-word-property-to-a-datatable-column