【问题标题】:jqGrid - Improper alignment in jqGrid Frozen column headerjqGrid - jqGrid 冻结列标题中的不正确对齐
【发布时间】:2015-02-21 12:40:45
【问题描述】:

当我包含以下样式以将换行添加到标题文本时,冻结列标题的对齐方式将丢失。

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

如何修复冻结列标题文本的布局? 下面可以看到目前的结果

【问题讨论】:

    标签: jqgrid


    【解决方案1】:

    在我看来,您的问题存在是因为基于height:auto 计算的非固定列标题的高度是另一个作为冻结列的高度。两个标头都存在于单独的 div 的单独的 hables 中。所以如果使用height:auto,高度就不能一样了。

    我认为您应该将冻结标头的高度设置为固定的height 值,该值与非冻结标头的值相同。我在the old answer 中描述了这种方法。 The another answer(参见the demo)对较新版本的 jqGrid 的旧建议进行了小修改。

    【讨论】:

      猜你喜欢
      • 2017-09-06
      • 2016-12-30
      • 1970-01-01
      • 2013-03-24
      • 2011-06-02
      • 1970-01-01
      • 2016-05-31
      • 1970-01-01
      相关资源
      最近更新 更多