Title: CSS Multiple tables
Last modified: April 19, 2018

---

# CSS Multiple tables

 *  Resolved [jack1998](https://wordpress.org/support/users/jack1998/)
 * (@jack1998)
 * [8 years ago](https://wordpress.org/support/topic/css-multiple-tables/)
 * Is it possible to add same CSS across multiple tables?

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years ago](https://wordpress.org/support/topic/css-multiple-tables/#post-10202715)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Yes, for that just use each table’s ID-based selector:
 *     ```
       .tablepress-id-2 tbody td,
       .tablepress-id-6 tbody td,
       .tablepress-id-19 tbody td {
         ...
       }
       ```
   
 * You can also use `.tablepress` (with an ID) to directly target all tables at 
   once.
 * To group tables without having to add the IDs to the CSS, you can use “Extra 
   CSS classes”, explained e.g. at [https://wordpress.org/support/topic/centering-text-in-select-columns/](https://wordpress.org/support/topic/centering-text-in-select-columns/)
   and [https://wordpress.org/support/topic/extra-css-syntax/](https://wordpress.org/support/topic/extra-css-syntax/)
 * Regards,
    Tobias
 *  Thread Starter [jack1998](https://wordpress.org/support/users/jack1998/)
 * (@jack1998)
 * [8 years ago](https://wordpress.org/support/topic/css-multiple-tables/#post-10206245)
 * Thanks.
 * I’ve set up an ID “tablepress-partners-table” and added the code to each table,
   however I’m not sure if that worked as the tables look different.Example below.
 * [http://www.walkersmotorgroup-offers.co.uk/new-vauxhall-adam-partner-deals/](http://www.walkersmotorgroup-offers.co.uk/new-vauxhall-adam-partner-deals/)
 * How can I make the table wider and rows a bit narrower? A bit like this one I
   found earlier – [http://www.seahawkslegends.com/1977-seattle-seahawks/](http://www.seahawkslegends.com/1977-seattle-seahawks/)
 * Thanks
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years ago](https://wordpress.org/support/topic/css-multiple-tables/#post-10206394)
 * Hi,
 * that’s great progress! To streamline the code and to achieve what you want, I
   recommend to replace your “Custom CSS” with this shorter version:
 *     ```
       .tablepress thead .sorting,
       .tablepress thead .sorting_asc,
       .tablepress thead .sorting_desc,
       .tablepress thead .sorting:hover {
       	background-color: #c3c5ce;
       	color: #ffffff;
       }
   
       .tablepress-partners-table thead th,
       .tablepress-partners-table tbody td {
       	text-align: center;
       	background-color: #f0f1f7;
       	font-family: arial;
       	font-size: 14px;
       	color: #111111;
       	padding: 4px;
       	line-height: normal;
       }
       ```
   
 * In addition, please uncheck the “Alternating row colors” checkbox on the table’s“
   Edit” screen (as it’s my understanding that you don’t want that effect, but the
   same background color for all rows).
 * Regards,
    Tobias

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

The topic ‘CSS Multiple tables’ 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: [8 years ago](https://wordpress.org/support/topic/css-multiple-tables/#post-10206394)
 * Status: resolved