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 to see the link]
The topic ‘Minimizing CSS’ is closed to new replies.