我正在使用DataTable 1.10并使用IE10和FF33.1。在FF表中显示div但在IE中它不是。
我有HTML标签的最小表格。
<table id="memberSearchResultTable" class="display" cellspacing="0">
..........
</table>
在firebug中使用DataTable渲染此表时,我可以看到以下代码
<div id="memberSearchResultTable_wrapper" class="dataTables_wrapper no-footer">
....
<table class="display dataTable no-footer" id="memberSearchResultTable"
role="grid" aria-describedby="memberSearchResultTable_info"
style="width: 705px;" cellSpacing="0" jQuery111109173364637806466="256">
....
</table>
....
</div>
我按照建议here
尝试使用CSS#memberSearchResultTable {
table-layout:fixed;
width:100%;
border:1px solid #f00;
word-wrap:break-word;
}
截图
有没有办法可以将此表的宽度设置为div?
答案 0 :(得分:0)
在这里得到答案http://datatables.net/forums/discussion/887/table-width
#memberSearchResultTable{
width: 100% !Important;
}