• Resolved m.songbird

    (@msongbird-1)


    Hi,
    I have added custom css to a set of tables.
    I used your example of

    .tablepress-id-3,
    .tablepress-id-5,
    .tablepress-id-9,
    .tablepress-id-12

    to call multiple tables and that works great. But I can’t make this work for the
    .tablepress-id-1 td {

    How do I make those rules apply to table 1-4?

    .tablepress-id-4 td {
    text-align: center;
    -moz-box-shadow: 5px 5px 5px #a1bbc9;
    box-shadow: 8px 8px 10px #a1bbc9;
    background-color: #f5f5f5;
    padding: 10px;
    text-align: center;
    }

    It works perfectly for one, but not in all four tables.
    I tried both:

    .tablepress-id-1,
    .tablepress-id-2,
    .tablepress-id-3,
    .tablepress-id-4 td{

    and writing out the complete css four times. In both cases only the css on table 4 works.

    Thanks!

    https://www.ads-software.com/plugins/tablepress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter m.songbird

    (@msongbird-1)

    Resolved!

    Turns out the answer was in the archives of this plugin.

    This is the right way to do it:

    .tablepress-id-1 th,
    .tablepress-id-1 td,
    .tablepress-id-2 th,
    .tablepress-id-2 td {
    css here
    }

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    nice find! Yes, that’s the best solution to combine this code.

    Best wishes,
    Tobias

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘apply css rules to cells in multiple tables’ is closed to new replies.