Datatables CSS question

Datatables CSS question

veloopityveloopity Posts: 87Questions: 36Answers: 2

The datatables CSS uses the same classes (such as .ui-widget) as other jQuery plugins. I want to get rid of the orange datatables header-footer (.ui-widget-header) but when I set it to display=none, the headers of other jQuery plugins that I use (e.g. a datepicker) disappear with it because they use the same class name. How can I make the datatables widget header disappear without making other plugin headers disappear?

Replies

  • allanallan Posts: 62,998Questions: 1Answers: 10,371 Site admin

    It uses jQuery UI classes if you use the jQuery UI integration. Likewise for Bootstrap and Foundation.

    Regarding the issue you are seeing, you could use the div.dt-jqueryui selector to select only inside the DataTable controlled elements (this class is added to the wrapper that DataTables puts around the table). So you could use div.dt-jqueryui div.ui-widget-header { display: none }.

    Allan

  • veloopityveloopity Posts: 87Questions: 36Answers: 2

    thx Allan! that did it !

  • zachpainter77zachpainter77 Posts: 22Questions: 1Answers: 1

    I usually just style my table before initializing it with datatables and then init datatables without jqueryui or bootstrap options

This discussion has been closed.