【问题标题】:Problem with wrapping jqGrid column headers on IE在 IE 上包装 jqGrid 列标题的问题
【发布时间】:2011-04-08 04:05:48
【问题描述】:

我在我的页面中使用 jqGrid,我修改了 ui.jqgrid.css 文件来包装列标题,如下所示:

.ui-jqgrid tr.jqgrow td {
    white-space: normal !important;
}

.ui-th-column,.ui-jqgrid .ui-jqgrid-htable th.ui-th-column{
    white-space:normal;
}

它在除 IE 之外的所有浏览器中都能正常工作!我试过IE7和IE8,问题依旧。

【问题讨论】:

    标签: header jqgrid word-wrap


    【解决方案1】:

    尝试另外使用

    .ui-th-div-ie {
        white-space:normal !important;
        height:auto !important;
    }
    

    已更新:在我看来,与其使用所有这些样式,不如使用以下样式:

    th.ui-th-column div{
        white-space:normal !important;
        height:auto !important;
        padding:2px;
    }
    

    它似乎在所有浏览器中都运行良好。查看示例here

    更新 2:您可以在the answer 中找到有关该问题的更多信息和更多演示。

    【讨论】:

      【解决方案2】:

      这应该可行:

      th.ui-th-column div{
          height:auto!important;
      }
      
      .ui-jqgrid .ui-jqgrid-htable th div {
          white-space:normal !important;
          height:auto!important;
          padding:2px;
      }
      

      我尝试了 Oleg 的答案。但是,虽然有包装,但高度并没有增加以适应内容。所以我修改了上面的css并且确实有效。我认为它会帮助像我这样的人。 :)

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2023-03-21
        • 1970-01-01
        • 1970-01-01
        • 2011-11-06
        • 2021-08-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多