Support » Plugin: TablePress » Changing table color when Datatables turned on

  • Resolved berniem3

    (@berniem3)


    If I don’t have the Use DataTables box checked, then I can control the background color of my tables. But if I want to enable “search” then I have to check that box and then the background color setting is ignored. The referenced webpage shows examples of both tables. Can you help?

    The table that works is Table 11. The other is Table 12. Here is the relevant CSS that I’m using:

    .tablepress thead th,
    .tablepress tfoot th {
    background-color: #000000;
    }

    .tablepress-id-12 th,
    .tablepress-id-12 td {
    border: 1px solid #cccccc;
    }

    .tablepress-id-12 .column-1 {
    width: 100px;
    }

    .tablepress-id-12 .column-2 {
    width: 100px;
    }

    .tablepress-id-12 .column-3 {
    width: 125px;
    }

    .tablepress-id-12 .column- {
    width: 100px;
    }

    .tablepress-id-11 th,
    .tablepress-id-11 td {
    border: 1px solid #cccccc;
    }

    .tablepress-id-11 .column-1 {
    width: 100px;
    }

    .tablepress-id-11 .column-2 {
    width: 100px;
    }

    .tablepress-id-11 .column-3 {
    width: 125px;
    }

    .tablepress-id-11 .column- {
    width: 100px;
    }

    Thanks again.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    The reason for this is interference in the CSS code by the Ultimate Tables plugin that you have installed. It’s changing the background color of all tables that use DataTables to white.

    You could now either deactivate the Ultimate Tables plugin (only if you are not using it of course), or use CSS code to set the background colors to what you desired, e.g. using

    .tablepress tbody td {
      background-color: #000000 !important;
    }
    

    Regards,
    Tobias

    Thread Starter berniem3

    (@berniem3)

    Thank you. Uninstalled Ultimate Tables and problem is resolved.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing table color when Datatables turned on’ is closed to new replies.