I'm trying to find css that will allow me to change the color of text depending on the current color of the text.
Here is the HTML (not HTML5) I'm trying to change:
<a href="link"><font color="green">2</font></a>
<a href="link"><font color="red">3</font></a>
<a href="link"><font color="red">2</font></a>
<a href="link"><font color="green">3</font></a>
<a href="link"><font color="red">2</font></a>
<a href="link"><font color="green">3</font></a>
What I want to do is change to red links to yellow and the green links to blue. I can't use javascript or change the HTML code. I'm only allowed to add CSS to change styles. Is there a way to do this using only CSS.
a font[color="red"] { color: yellow; }
a font[color="green"] { color: blue; }
http://jsfiddle.net/3zLfb/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With