Bootstrap 3 align classes for body or head only

Bootstrap 3 align classes for body or head only

jrizzi1jrizzi1 Posts: 44Questions: 12Answers: 3

I notice that the basic styles documentation show classes that right align text for the entire column (dt-right) , for the body only (dt-body-right) or for the header only (dt-head-right)

I am attempting to use the bootstrap 3 class to align text "text-right" in the columns[] array in the datatable object, but it always aligns all of the columns text right, both header and body

    { data: 'capacity_rating_desc',
      class:'text-right'},

probably a simple css trick , but I am missing the boat

Answers

  • tstonehbststonehbs Posts: 5Questions: 1Answers: 0

    I've noticed this problem as well. The CSS classes dt-body-right and dt-head-right only exist in jquery.dataTables.css and not in dataTables.bootstrap.css. Seems to have been left out for some reason. You can't include both as your tables get styled twice.

    For reference, on this page http://www.datatables.net/manual/styling/bootstrap it states:

    For CSS only a single file should be included as the styling library will provide the core styling options for the table. The CSS files have the format dataTables.{style}.css (dataTables.bootstrap.css for Bootstrap for example)

This discussion has been closed.