- Mar 22, 2013
- 9,153
- 10,492
So let's say there's a page with 3, or 5, or 10 of these:
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?
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?