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
You might have forgotten after specifying the class, you need to add the following in CSS:
.dt-head-center {text-align: center;}
Also, if the class has not been added to the To make it specific to a particular table, you can give the table an of the table, try adding the below CSS for generic stuff:
thead, th {text-align: center;}
/* OR */
.table thead,
.table th {text-align: center;}
id="tableID"
and then in the CSS, you can do:#tableID thead,
#tableID th {text-align: center;}