如何将word wrap break word属性提供给datatable列 [英] How to give word wrap break word property to a datatable column

查看:183
本文介绍了如何将word wrap break word属性提供给datatable列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<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> 

嗨朋友,这里是我的数据表。我想要实现word-wrap break word属性到消息列,这样长的消息与空间将会中断。你能告诉我应该如何在数据表中的一个列中实现word-wrap break word属性。

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.

推荐答案

在css中添加这个类。

Add this class in your css.

#user tbody td:nth-child(2)
{
    word-wrap:break-word !important;
}

这篇关于如何将word wrap break word属性提供给datatable列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆