setting text align table head/body
setting text align table head/body
ltdeta
Posts: 23Questions: 9Answers: 0
How can i use the default styling options with
for example how to use "dt-right" with option "columns" and "aocolumns"
i want to show the first column as follow dt-head-right
and dt-body-left
Regard,
Carsten
This discussion has been closed.
Answers
With what? :-)
You can use the classes with the
columns.className
option. There is an example at the bottom of that documentation page showing how to assign a class in the initialisation.Allan
what I would therefore like is setting different text-align for column-header and column-data with the "default styling options"
I don't really understand how to use the syntax for "cell classes"...
Based on the example from the docs page:
Does that make it clearer?
yes, but it doesn't work
here are the inspector html for "dataTables_scroll" dataTables_scroll.html
can i also change the column header text-align on the same table with
dt-head-center
?Regard, Carsten
here is the js datatable configuration DataTableDef
Can you link me to the page you are working on please. I don't see why that wouldn't work unless you were using an old version of DataTables or its stylesheet.
Allan
sorry, i am behind a firewall and have no chance to give you access
here is a jsFiddle based on the example "jQuery UI"
It also won't work
I see - I didn't know you are using the jQuery UI integration stylesheet. That did have the text alignment classes in it. I've just committed the change required to add it and you can download the latest CSS file from here.
Allan
sorry, i should have also mentioned that
now it works :)
Carsten