I have a css that modifies a child element under specific circumstances (and only if the child element has a specific class). Now my problem is that I (in addition) need to modify a different child of the father node during the same circumstances. And (especially also as IE has no parent node selector) I'm not sure if it is at all possible with pure CSS (I thought a lot there but didn't come to a conclusion).
So my question is: Is it possible and if so how?
To go into more details:
<form id="ResultForm">
<div class="rddtSlide">
MyTest
</div>
<div>
<div id="InterfaceContainer">
test3
<div id="Interface" class="t2">
Test2
</div>
</div>
</div>
</form>
The css code that I have now:
div#InterfaceContainer > div#Interface.t2 {
color: blue;
}
div#InterfaceContainer:hover > div#Interface.t2 {
color: red;
}
Now what I'm trying to achieve is that if div#Interface.t2 gets the red color then rddtSlide should also get the red color. And if it gets the blue color then the other one should also get the blue color. The class t2 is added and removed via jquery.
Originally I used a sole CSS approach for this as I had troubles with the mouseevents for mouseout,... firing when they shouldn't. Thus I need to stay in a pure CSS approach if possible at all.
So to ask it here again: Is it possible to do this with pure CSS and if so how?