Title: Multiple Table Code
Last modified: August 2, 2018

---

# Multiple Table Code

 *  Resolved [theangrychicken](https://wordpress.org/support/users/theangrychicken/)
 * (@theangrychicken)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/multiple-table-code/)
 * Hi
    I need to create multiple tables. Is there a quick way to reference all tables
   ie table 1 to 50 without having new code for each table ? An all encompassing
   simple easy code instead of:
 * .tablepress-id-2 tbody td {
    color: #000000; }
 * .tablepress thead th,
    .tablepress tfoot th { background-color: #ff6600; }
 * .tablepress-id-2 {
    width: auto; margin: 0 auto 1em; }
 * .tablepress-id-2 .column-2 {
    text-align: center; }
 * .tablepress-id-3 tbody td {
    color: #000000; }
 * .tablepress thead th,
    .tablepress tfoot th { background-color: #ff6600; }
 * .tablepress-id-3 {
    width: auto; margin: 0 auto 1em; }
 * .tablepress-id-3 .column-2 {
    text-align: center; }
 * .tablepress-id-4 tbody td {
    color: #000000; }
 * .tablepress thead th,
    .tablepress tfoot th { background-color: #ff6600; }
 * .tablepress-id-4 {
    width: auto; margin: 0 auto 1em; }
 * .tablepress-id-4 .column-2 {
    text-align: center; }
 * etc etc
    Thanks

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/multiple-table-code/#post-10550086)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Directly targeting a group of tables in a short CSS command is not possible, 
   unfortunately. Your best chance here is to use the general `.tablepress` selector(
   as you are already doing), to target ALL TablePress tables on the site.
 * Another idea would be to group tables yourself, using so-called “Extra CSS classes”.
   With this, you would add a table to a desired group on its “Edit” screen and 
   could then use much smaller CSS code. For an example of that, please see [https://wordpress.org/support/topic/table-groups/](https://wordpress.org/support/topic/table-groups/)
 * Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Multiple Table Code’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/multiple-table-code/#post-10550086)
 * Status: resolved