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;
}
精彩评论