【发布时间】:2011-12-24 21:06:04
【问题描述】:
我有以下 DataTable(全角 css 类设置宽度 = 100%)
<table class="datatable full-width">
<thead>
<th>LOB</th>
<th>Creditor Line 1</th>
<th>Creditor Line 2</th>
<th>Address</th>
<th>City</th>
<th>State</th>
<th>Zip</th>
<th></th>
</thead>
<tbody>
...
</tbody>
</table>
Javascript:
var profileTable =
$(".datatable").dataTable({
"iDisplayLength": 25,
"bDestroy": true,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bAutoWidth": false
});
在出现带有长文本字符串的记录之前一切正常...当出现带有非常长文本的记录时,页面右侧的数据表溢出。 (见下面的截图,红线是页面应该结束的地方) http://i1109.photobucket.com/albums/h430/tbarbedo/overflow.jpg
谁能告诉我如何在单元格中换行或防止这个溢出问题?
我已经尝试通过 'table-layout: fixed'...这可以防止溢出,但会将所有列设置为相同的宽度。
谢谢
【问题讨论】:
标签: jquery html css asp.net-mvc-3 datatables