• Resolved mrbrit

    (@mrbrit)


    Hi, I want to have some tables without a border. How can I tell the css that I want tables 1, 4, 7 and 8 to remove borders. It is a bit time consuming to create a set of code for each table

    .tablepress-id-4,
    .tablepress-id-4 tr,
    .tablepress-id-4 tbody td,
    .tablepress-id-4 thead th,
    .tablepress-id-4 tfoot th {
    border: none !important;
    }

    Instead of just table 4, how can I add the other tables to react the same. I have tried

    .tablepress-id-1, 4, 7, 8 but it doesn’t work.

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    One way here could be to make use of “Extra CSS classes”. For example, you could add

    tablepress-no-borders
    

    to the “Extra CSS classes” text field on the “Edit” screens of tables 1, 4, 7, and 8.
    Then, you’d just have to use the CSS

    .tablepress-no-borders,
    .tablepress-no-borders tr,
    .tablepress-no-borders td,
    .tablepress-no-borders th {
      border: none !important;
    }

    to remove the borders on those tables.

    Regards,
    Tobias

    Thread Starter mrbrit

    (@mrbrit)

    Thanks so much. It worked

    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 ‘Add css value to multiple tables’ is closed to new replies.