Conditional Coloration
-
Tobias,
First, I love your plugin, and I would have no site without it. Great work.
I have a question that I fear may not have an easy answer. I have searched the support forum and haven’t found anything that matches mine.
My tables contain information about NFL teams, and each row’s color is based on the team’s colors. When I have a single season worth of data, that means 32 rows, which is simple. The code I use is this:
.tablepress-id-6 .row-2 td { background-color: #97233F; } .tablepress-id-6 .row-2 td { color: #FFFFFF; } .tablepress-id-6 .row-3 td { background-color: #000000; } .tablepress-id-6 .row-3 td { color: #C60C30; }
and so on, down to row-33
However, I plan on posting a historical table with every season-team since 1941 (about 1800 rows), and I don’t know that I can manually do that much without going nuts.
Is it possible, using custom css, to write something along the lines of:
.tablepress .row-contents”Arizona Cardinals” td {
background-color:#97233F,
color: #FFFFFF; }So that all tables in the future will automatically fill in the color for any given team from any given year?
Thanks again for the great product.
- The topic ‘Conditional Coloration’ is closed to new replies.