bootstrap3 styling doesn't work properly

bootstrap3 styling doesn't work properly

badbytebadbyte Posts: 33Questions: 7Answers: 0

I'm trying to give the datatable a look and feel of bootstrap and there is a section on this site that demonstrates how it is done: https://datatables.net/examples/styling/bootstrap.html
The instructions are very clear and easy to understand. I have made the changes and added the necessary files as requested.
Yet I get this:

Please let me know if I need to post any code when necessary.

Replies

  • kthorngrenkthorngren Posts: 21,301Questions: 26Answers: 4,946

    Looks like you have the Bootstrap style sorting arrows and the Datatables style sorting arrows. This suggests you have extra Datatables styling files. The easiest way to get the proper files is to use the Download Builder

    Kevin

  • badbytebadbyte Posts: 33Questions: 7Answers: 0

    I would agree, but just out of curiosity where would I change the path of the fonts?
    And when I use the download builder, what do I need to check?

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    What fonts? DataTables doesn't use any specific fonts.

    When you use the download builder, at the bottom of the page it shows you the files you need to include.

    My guess is that you've also got the table hidden when it is initialised (perhaps in a tab?), although without a test case it is impossible to say for sure. You need to call columns.adjust() when the table is made visible.

    Allan

  • badbytebadbyte Posts: 33Questions: 7Answers: 0

    @allan: yes that is true I have it under a separate tab. what is it that I have to consider in this case?

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Have a look at this example for details.

    Allan

  • badbytebadbyte Posts: 33Questions: 7Answers: 0

    ok, that solved the column width definition, but the icons / symbols for sorting according to a column is not completely rendered.

    The search box doesn't have the bootstrap look&feel

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    I'm guessing that you haven't included the Bootstrap / DataTables integration file. Use the download builder.

    Beyond that, I'd need a link to a test case.

    Allan

  • badbytebadbyte Posts: 33Questions: 7Answers: 0

    bootstrap is already included, but not from the download builder. That could come into conflict if I added another bootstrap to my solution, or?

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    You'd only add Bootstrap once. Don't select the option to include the whole Bootstrap library if you already have Bootstrap. Just select the Bootstrap styling.

    Allan

This discussion has been closed.