Title: Minimizing CSS
Last modified: March 23, 2021

---

# Minimizing CSS

 *  Resolved [esbfi](https://wordpress.org/support/users/esbfi/)
 * (@esbfi)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/minimizing-css/)
 * I have an ongoing interview series on my blog. It will run on my blog for years,
   and will likely accrue to at least 20 posts before the end of the year (with 
   perhaps 12 per year after that).
 * Problem is, each post includes 6 tables. And I need to add the exact same custom
   CSS styling to each of those tables. 6 tables x 20+ posts in year one, then 12
   posts per year after that is a lot of tables and a lot of CSS code!
 * Below, you can see the styling I’ve added for the first four interviews:
 * .tablepress-id-14 .column-1,
    .tablepress-id-15 .column-1, .tablepress-id-16 .
   column-1, .tablepress-id-17 .column-1, .tablepress-id-18 .column-1, .tablepress-
   id-19 .column-1, .tablepress-id-20 .column-1, .tablepress-id-21 .column-1, .tablepress-
   id-22 .column-1, .tablepress-id-23 .column-1, .tablepress-id-24 .column-1, .tablepress-
   id-25 .column-1, .tablepress-id-26 .column-1, .tablepress-id-27 .column-1, .tablepress-
   id-28 .column-1, .tablepress-id-29 .column-1, .tablepress-id-30 .column-1, .tablepress-
   id-31 .column-1, .tablepress-id-32 .column-1, .tablepress-id-33 .column-1, .tablepress-
   id-34 .column-1, .tablepress-id-35 .column-1, .tablepress-id-36 .column-1, .tablepress-
   id-37 .column-1, .tablepress-id-38 .column-1 { width: 35%; }
 * That’s a lot of CSS, and I’m only about 20% of the way through my interviews 
   just for this year! My question: is there a way to minimize this by only needing
   to mention the table id # and not the entire line for every single table?
 * Apologies if this is a dumb request. I am not a programmer, so I only have very
   basic knowledge of CSS! Thanks in advance for your help.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fminimizing-css%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)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/minimizing-css/#post-14227355)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Unfortunately, shortening this so that only the table ID is needed is not possible,
   due to how CSS code works.
    However, you could maybe use a slightly different
   approach: [https://wordpress.org/support/topic/creating-a-class-for-multiple-tables/#post-12569808](https://wordpress.org/support/topic/creating-a-class-for-multiple-tables/#post-12569808)
 * With this, you would essentially define a “template styling” for your tables 
   with CSS code once. Then, you would “assign” that template to a table by giving
   the table the “Extra CSS class” that you used in the template CSS code.
 * Regards,
    Tobias
 *  Thread Starter [esbfi](https://wordpress.org/support/users/esbfi/)
 * (@esbfi)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/minimizing-css/#post-14257074)
 * Hello TobiasBG,
 * Sorry for my late reply. I knew I’d need some focused time to figure this out,
   and I only had time to get to it now!
 * I went through the thread that you shared, as well as the numerous threads that
   you linked to from that thread and the ones prior. They were all very helpful!
 * I figured it out, and now have very happily added the Extra CSS class to all 
   the tables in my series (and was able to delete the very long list of custom 
   CSS that listed each table). THANK YOU for the amazing support and wonderful 
   plugin!
 * Chrissy
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/minimizing-css/#post-14258589)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias

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

The topic ‘Minimizing CSS’ 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: [5 years, 1 month ago](https://wordpress.org/support/topic/minimizing-css/#post-14258589)
 * Status: resolved