<table id="example" class="table table-border table-bordered table-bg table-hover table-sort"> <thead> <tr class="text-c"> <th width="25"> <input type="checkbox" name="checkall" class="checkall" onclick="checkedclean();"> </th> <th width="100">名称</th> <th width="100">说明</th> <th width="100">类型</th> <th width="60">是否默认</th> <th width="20">状态</th> <th width="100"></th> </thead> <tbody> </tbody> </table>
解决方法
#example{ width: 100% !important; }
如果遇到设有横向滚动条时,就固定设置table宽度
#example{ width: ***px !important; }
收工,这样就完美解决了!!
相关推荐:
jquery插件datatables属性介绍及创建分页、排序实例详解
jquery datatables是什么?datatables如何使用?
jquery+php实现导出datatables插件数据到excel的方法,jquerydatatables_php教程
以上就是jquery datatables表头不对齐的解决办法的详细内容。