ajFranzman Posted December 3, 2010 Share Posted December 3, 2010 (edited) (Re: IE6-- I know, I know...)I've been searching the web all day trying to find the answer to this, and it seems that either the answer just isn't out there, or I don't have the expertise/vocabulary to ask the question properly for Google.Is it possible to put code into a user .css style sheet under MSIE 6 which will change the color of an element, based on its current color? What I want to do is, when the user on this machine hovers over a text hyperlink, change its color to dark green unless the link is originally white or yellow, in which case it should change to yellow.I was able to find that CSS does not have an inequality operator (no such thing as :link:hover[color<>"white"] , for example) nor apparently any form of branching or if-then-else. I was hoping that perhaps a script making use of the "expression()" construct could work, but then I discovered that it's also seemingly not possible to add a class to an element (this can be done in HTML, but apparently not in a user .css stylesheet). I was thinking that if I could add an identifying class to the white or yellow links, then change any hovered link to dark green, then change the hovered link to yellow only if it is of the class previously identified as white or yellow, that that would work. Edited December 3, 2010 by ajFranzman Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now