开发者

How center text of the column headers in SlickGrid?

there any way to center text in a column header Any ideas how to do thi开发者_C百科s or what ccs must be changed ?


Add the following style in your css:

.slick-header-column {
   text-align: center;
}


If you don't want all column headers to be aligned the same way, you can also define individual css classes via the headerCssClass attribute of a column definition, like:

var columns = [
    {id: "title", name: "Title", field: "title", headerCssClass: 'text'},
    {id: "price", name: "Price", field: "price", headerCssClass: 'currency'}
];

and:

.slick-header-column.currency {
    text-align: center;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜