dataTables单元格中的自动换行符

时间:2014-09-23 12:09:46

标签: jquery html twitter-bootstrap datatables

我有一个带有dataTables表的boostrap模式。我有一个问题,其中内容没有空格或换行符的单元格增加了模态之外的表格的宽度。

我该如何解决这个问题?见下图

enter image description here

2 个答案:

答案 0 :(得分:1)

尝试将以下css应用于单元格:

word-break:break-all;

检查JSFIDDLE

如果这对您不起作用...尝试使用white-space

white-space: normal;

答案 1 :(得分:0)

Varde 列中添加white-space:normal;样式。

<table class="datatable-init table table-striped table-bordered" style="width:100%">
    <thead>
        <tr>
        <th>Detaij</th>
        <th>Varde</th>
        </tr>
    <thead>
 <tbody>
   <tr>
     <td></td>
     <td style="white-space:normal;"></td>
   </tr>
 </tbody>
</table>
相关问题