Applying custom CSS to multiple pages
-
Hi Tobias,
I hope you’re well.
I have some custom CSS which I’ve added to the Plugin Options tab of TablePress and they’re working great:
.tablepress-id-11 .column-2 { width: 400px; } .tablepress-id-11 .column-1 { width: 400px; } .tablepress-id-11 { width: auto; margin: 0 auto 1em; } .tablepress-id-11 tbody td { font-family: Lato; font-size: 17px; } .tablepress-id-11 { border: 1px solid #808080; } .tablepress-id-11 .row-1 td { border: 1px #808080 solid !important; } .tablepress-id-11 .row-2 td { border: 1px #808080 solid !important; } .tablepress-id-11 .row-3 td { border: 1px #808080 solid !important; } .tablepress-id-11 .row-4 td { border: 1px #808080 solid !important; } .tablepress-id-11 { text-align: center; vertical-align: middle; }However I want to apply this CSS to about 280 other tables I have on my site.
Is there a quicker way to do this without copying and pasting this CSS and then changing the table id to each of the tables 280 times?
Or if that is the only way, is there any way to adjust that CSS so that it only displays the table id number once rather than 110 times for each table, as that will make it a lot quicker to do manually.
I also considered the idea of applying this CSS to all tables on the site (which I believe I would do by removing
.tablespress-id-11), but I also have some other tables on the site which I would not want this CSS applying to. So if there’s a way to exempt certain tables from having this coding that would also help immensely.Not sure what you think is the best option to go for, but any suggestions will be greatly appreciated.
Kind regards,
Ramsay
The topic ‘Applying custom CSS to multiple pages’ is closed to new replies.