Align cells, override individual columns for built in datatypes
Align cells, override individual columns for built in datatypes
In the discussion https://datatables.net/forums/discussion/comment/228325/#Comment_228325 you mentioned:
You could assign other classes if you prefer. It looks like dt-type-date will take preference over dt-left regardless of order in the class list, I suspect due to the ordering in the CSS. I'll look at that as well.
The user mentioned:
The problem is, the custom class is added before the automatic class, so its styles are overwritten, including the for me important text-align.
I don't want to override all dt-type-numeric columns in my datatable from being right aligned, but I was hoping I could add the className: 'dt-left' to those columns identified as dt-type-numeric that I want to override. Were you able to review the CSS for precedence.
This question has an accepted answers - jump to answer
Answers
I haven't found a way to do that yet, however, it can be done with a little CSS:
https://live.datatables.net/cecodewu/1/edit (Age column).
Allan
Thanks for the info, I also had to add CSS for the header