如何在不更改css(全局)的情况下将网格标题居中? 通过defaut,标题在左边。
答案 0 :(得分:7)
我认为标题中心的代码可能是关于以下内容的
$("#grid").closest("div.ui-jqgrid-view")
.children("div.ui-jqgrid-titlebar")
.css("text-align", "center")
.children("span.ui-jqgrid-title")
.css("float", "none");
请参阅the demo:
答案 1 :(得分:0)
已经提出这个问题已有一段时间了。另一种方法是:
<style>
.ui-jqgrid-caption {
text-align:center !important;
}
</style>