Left align header
Left align header

I am generating a data table from source and cannot find the correct way to change the allignment of the header.
I tried the solution from here: https://datatables.net/forums/discussion/51066/not-able-to-align-the-header-to-the-left
but this did not work.
My desperate try to make it work can be found here: https://jsfiddle.net/1ptdjr93/26/.
Is it possible that the approach is different if the data table is created from source?
This discussion has been closed.
Answers
I'm not a CSS expert but
text-right
, etc are built into Bootstrap but not sure there is a CSS in Datatables for them. The thread you posted is Bootstrap specific and using a class like that works in your example using Bootstrap:https://jsfiddle.net/fv8xngtw/
For your example without Bootstrap you will need to add your own CSS, for example:
Your updated example without Bootstrap:
https://jsfiddle.net/05s7wv61/
I removed the last two lines of your example to rely only on
columns.className
.Kevin