How to add CSS to tr/td with no identifiers (Greasemonkey/Stylus)?

Scorpion Ghost

Elite Member
Executive VIP
Jr. VIP
Joined
Mar 22, 2013
Messages
9,153
Reaction score
10,492
So let's say there's a page with 3, or 5, or 10 of these:

trtd.PNG


All the "tr" have the same class, and the id is always the same but the number there always changes. The "td" have no id and no class.

What I want is to "inject" custom CSS to the page, using Grasemonkey or Stylus or something. I want to add a different CSS to each "td".

So I'm thinking, the solution finds all the elements on the page with "class="my-class". And then it applies this logic to each of them:

1st td X css
2nd td Y css
3rd td Z css
etc etc etc...

How can it be done?
 
Back
Top