Title: Global CSS Selector
Last modified: November 12, 2022

---

# Global CSS Selector

 *  Resolved [roman1309](https://wordpress.org/support/users/roman1309/)
 * (@roman1309)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/global-css-selector/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fglobal-css-selector%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/global-css-selector/#post-16192350)
 * 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](https://wordpress.org/support/users/roman1309/)
 * (@roman1309)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/global-css-selector/#post-16193107)
 * It works! Thank you Tobias for the great help.
 * Regards,
    Roman
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/global-css-selector/#post-16193218)
 * 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](https://wordpress.org/support/plugin/tablepress/reviews/#new-post)
   in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Global CSS Selector’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/global-css-selector/#post-16193218)
 * Status: resolved