• jqGrid表头与数据不对齐的问题


    原文:https://bbs.csdn.net/topics/392100457?depth_1-utm_source=distribute.pc_relevant.none-task-discussion_topic-BlogCommendFromBaidu-2&utm_source=distribute.pc_relevant.none-task-discussion_topic-BlogCommendFromBaidu-2

    如果数据太长,因为ui.jqgrid.css中.ui-jqgrid tr.jqgrow td 设置了white-space: pre;导致数据与表头不对齐
    解决方法1:
    设置white-space为normal
    解决方法2:
    colModel设置数据的宽度
    在火狐中,即便设置了宽度,表头和数据还是不对齐,
    解决方法:
    ui.jqgrid.css 中.ui-jqgrid tr.jqgfirstrow td  设置的样式padding: 0 2px 0 2px;border-right- 1px; border-right-style: solid;注释掉就可以了

    我的处理方法,在html页面添加style

      .ui-jqgrid tr.jqgrow td {
        white-space: normal;
      }
      .ui-jqgrid tr.jqgfirstrow td {
        padding: 0 2px 0 2px;
        border-right-width: 1px; 
        border-right-style: solid;
      }

     bootstrap2中标题和td因数据太长对不齐

    table{
        width: 100%;
        table-layout: fixed;
        word-break: break-all;
      }
  • 相关阅读:
    小错误
    创建表空间
    mysql
    myeclipse
    linux命令小结
    jquery
    java基础
    【学习笔记】【多项式】多项式插值相关_个人学习用
    SHUoj 神无月排位赛
    SHUoj 字符串进制转换
  • 原文地址:https://www.cnblogs.com/yifengs/p/12652000.html
Copyright © 2020-2023  润新知