Right align column with Bootstrap
Right align column with Bootstrap
2Tiny
Posts: 7Questions: 0Answers: 0
I noticed that after replacing the default DT style with Bootstrap styling dt-right
and dt-nowrap
no longer works.
Can't find any information that I should use Bootstrap specific commands for these options to work..
$(document).ready( function () {
var table = $('#example').DataTable({
"columnDefs": [
{ className: "dt-right", "targets": [3,5] },
{ className: "dt-nowrap", "targets": [0,1] }
]
});
} );
This discussion has been closed.
Replies
Those styles are specific to the DataTables stylesheet.
Bootstrap has its own alignment classes.
Allan
Thank you Allen.
Hi,
I am using Bootstrap alignment classes and it works fine, except that it aligns headers too and I want to separate header alignment from data alignment.
This is an example http://live.datatables.net/rubesuze/15/embed