Link to home
Start Free TrialLog in
Avatar of AccurateDesign
AccurateDesign

asked on

CSS Only, Change Child of a Different Parent

Is there a way to change the style of a child item of a different parent with CSS only?

Example: http://jsfiddle.net/ZCZAd/
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AccurateDesign
AccurateDesign

ASKER

yes I can use jquery, but I was wondering if it was possible with pure css

thanks :)
After reading your question and fiddle again, are you wanting the hover on the LI's or the actual div?
The fiddle says hover this menu but in the css you are targeting the LI

http://jsfiddle.net/ZCZAd/3/

#parent1:hover ~ #parent2 li { color: orange; }

Open in new window

sorry I meant to change the actual LI when hovering on a LI of the other parent

Would that be possible in CSS or only in jQuery?
No, only with js (jquery)