如何在jQuery网格中更改标题高度?

use*_*625 12 jquery jqgrid

我有一个jQuery网格,有5列.我的列名太大所以我在jQuery网格中定义了类似的东西:

Information about <br/> customers bioData
Run Code Online (Sandbox Code Playgroud)

在我的jQuery专栏中,我看到"有关信息",但我无法看到"Customers BioData".

如何设置标题高度?

Bra*_*ord 17

如果你指的是jqGrid,看起来修复是一个CSS调整,如下面的文章:

http://www.trirand.com/blog/?page_id=393/help/grid-header-height/ http://2centtech.blogspot.com/2009/12/jqgrid-header-and-cell-value-word -wrap.html

.ui-jqgrid .ui-jqgrid-htable th div {
    height:auto;
    overflow:hidden;
    padding-right:4px;
    padding-top:2px;
    position:relative;
    vertical-align:text-top;
    white-space:normal !important;
}
Run Code Online (Sandbox Code Playgroud)

编辑:作为RD22在评论中发现,似乎jqGrid的某些版本可能有一个!important对高度规则的标志(和其他?).因此,如果您发现上述CSS不起作用,那可能就是原因.只需将上述规则更改为包含height:auto !important,您就应该好好去.


小智 7

优秀,但对于IE,除了上面的课程,你还需要添加以下内容.

.ui-jqgrid table.ui-jqgrid-htable {
    height:30px;
} 
Run Code Online (Sandbox Code Playgroud)