jQuery的数据表 - 表头的宽度不与车身宽度一致 [英] datatable jquery - table header width not aligned with body width

查看:2235
本文介绍了jQuery的数据表 - 表头的宽度不与车身宽度一致的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jQuery的数据表,运行应用程序时,头部宽度不与身体对准width.But当我点击的标题,它越来越与车身宽度一致,但即使再有就是一些光错位。只发生在IE这个问题。

I am using datatables jquery, When running the application, the header width is not aligned with the body width.But when I click on the header, it is getting aligned with the body width but even then there is some light misalignment.This problem occurs only in IE.

的jsfiddle

JSFiddle

截图: 这是它的外观时,页面被加载:

screenshot : This is how it looks when page gets loaded :

在点击标题:

我的数据表code:

$("#rates").dataTable({
    "bPaginate": false,
    "sScrollY": "250px",
    "bAutoWidth": false,
    "bScrollCollapse": true,
    "bLengthChange": false,
    "bFilter": false,
    "sDom": '<"top">rt<"bottom"flp><"clear">',
    "aoColumns": [{
            "bSortable": false
        },
        null,
        null,
        null,
        null
    ]
});

率是我的表ID。 谁能帮我这个?先谢谢了。

rates is my table id. Could anyone help me with this? Thanks in advance.

推荐答案

找到了解决办法:

新增表格布局:固定表。而在打开IE模式的应用程序。

Added table-layout:fixed to the table. And opened the application in IE mode.

这篇关于jQuery的数据表 - 表头的宽度不与车身宽度一致的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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