Styling No Work
Styling No Work
Massimo1974
Posts: 27Questions: 2Answers: 0
aoColumns: [
{className: "dt-body-center"}]
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
It works here:
http://live.datatables.net/bamocena/1/edit
Looks like you are defining one column. Do you have only one column in your table?
If you have more than one then your column config is incorrect. Please refer to
columns
for more details. You might want to consider usingcolumnDefs
like my example.If you have only one column then we will need to see a test case replicating your issue to help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Resolved
aoColumnDefs: [
{className: "dt-body-right", "targets": [14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]},
{className: "dt-body-left", "targets": [8,9,10,11,12,13]},
{className: "dt-body-center", "targets": [1,2,3,4,5,6,7,30,31,32,33,34]}
],
and css :
.dt-body-right{
text-align: right;
}
.dt-body-center{
text-align: center;
}
.dt-body-left{
text-align: left;
}