how can we modify the css if we use https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css

how can we modify the css if we use https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css

Adarsh94Adarsh94 Posts: 10Questions: 6Answers: 0

i would like to load this style sheet and modify the existing css according to my web page. Is it possible and if possible please let me know the procedure asap.

Thanks in advance

This question has an accepted answers - jump to answer

Answers

  • Bindrid2Bindrid2 Posts: 79Questions: 4Answers: 12
    edited July 2018

    Fast answer.
    Load jquery.datatables.min.css.

    load local.datatables.css which is you css that overwrites the above file.
    local.datatables.css only contains the classes that you want to change.
    This way, you don't have to worry about reediting the css everytime you do an update on Datatables files.

    With Css, if you use the same rules, the last rule to load wins.

  • Bindrid2Bindrid2 Posts: 79Questions: 4Answers: 12
    Answer ✓

    or use https://datatables.net/manual/styling/theme-creator to create your own theme.

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

    Over just use your own styles to overwrite the styles you want to change, as you would do with any other CSS file. The last rule wins! Worth reading over CSS precedence as well if you are new to the topic.

    Allan

This discussion has been closed.