• Resolved roman1309

    (@roman1309)


    Hi. I have four tables on the same page. Each table has its own ID. To make the same css apply to all four tables I want to use the global CSS selector (.tablepress). But what is the correct shortcode?

    Like this [table] ?

    The plugin and support is great

    Bye
    Roman

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    There’s no need to change the Shortcodes here. These are only used for embedding the tables, but they don’t influence styling.

    Instead, to be able to use the global CSS selector .tablepress on this page, but without affecting tables on other pages of the site, you’ll need to find the ID of the page. You can see that in the browser’s URL bar when editing the page, it’s the number after the post variable in the URL, e.g. for /wp-admin/post.php?post=8334&action=edit the ID is 8334.

    Then, you can use this “Custom CSS” code:

    .page-id-8334 .tablepress ... {
       ...
    }

    with whatever more specific CSS selectors and CSS commands you want to apply to the tables on this page.

    Regards,
    Tobias

    Thread Starter roman1309

    (@roman1309)

    It works! Thank you Tobias for the great help.

    Regards,
    Roman

    Plugin Author Tobias Bäthge

    (@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 ‘Global CSS Selector’ is closed to new replies.