'dt-body-center' is not working on bootstrap 4 styling.

'dt-body-center' is not working on bootstrap 4 styling.

wanghowangho Posts: 6Questions: 2Answers: 0
edited May 2019 in Free community support

I applied 'dt-body-center' to sort but it didn't work.
It is missing in css, Bootstrap 4 styling. On further confirmation, it was only applied to default styling and jery-ui.

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @wangho ,

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • wanghowangho Posts: 6Questions: 2Answers: 0
    edited May 2019

    Sorry @colin , I didn't have enough explanation. And I didn't follow the rules.

    I was download full option.
    (Because I am working in Internal network. Can't connect internet.)
    - Step1: Bootstrap 4
    - Step2: DataTables. I use another bootstrap library. That's downloaded from official bootstrap site. version 4.3.1
    - Extentions: Selected All

    And I attach link as below.
    http://live.datatables.net/wogeloge/1/edit?html,js,output

  • kthorngrenkthorngren Posts: 21,144Questions: 26Answers: 4,918
    edited May 2019

    I think that style might only be in the jquery.dataTables.css which you aren't loading when using the Datatables Bootstrap files. You can add this directly to your CSS:

    .dt-body-center{
      text-align: center;
    }
    

    Here is your updated example:
    http://live.datatables.net/loduvoke/1/edit

    Kevin

  • wanghowangho Posts: 6Questions: 2Answers: 0

    @kthorngren We see here again:)

    I see, Now it's meant to be. Just use a text-{align option} on bootstrap.

    Thank you~ :)

This discussion has been closed.