How to center align datatables header

前端 未结 4 1907
渐次进展
渐次进展 2021-02-19 23:32

I\'m new to datatables. When I make table header, it\'s always left align. How can I set the header to center align? I\'ve read datatables.net/manual/styling/classes and datatab

4条回答
  •  独厮守ぢ
    2021-02-20 00:18

    You can do this with CSS. Just use your table class as a selector and target every table heading inside that selector, like this:

    .table th {
      text-align: center;
    }
    

提交回复
热议问题