10 weber Posted September 27, 2010 Share Posted September 27, 2010 I would like to use CSS (without JS) to change an element's style when the mouse is over a specific child. This code doe's the opposite (changes the child's style when you mouse over it's parent): <style type="text/css">#child {color:Black;}#parent:hover #child {color:Blue;}</style><div id="parent">text<div id="child">text</div></div> How can I effect the parent? Link to comment Share on other sites More sharing options...
thescientist Posted September 27, 2010 Share Posted September 27, 2010 as far as I know there is no way to go up the tree, only horizontally and vertically downward.edit: through straight CSS, that is Link to comment Share on other sites More sharing options...
ShadowMage Posted September 27, 2010 Share Posted September 27, 2010 Nope, nothing on w3.org selectors page that goes up the tree. Link to comment Share on other sites More sharing options...
10 weber Posted September 27, 2010 Author Share Posted September 27, 2010 Nope, nothing on w3.org selectors page that goes up the tree.Is there a suggestions form at w3.org? I want to suggest that selector. Link to comment Share on other sites More sharing options...
ShadowMage Posted September 27, 2010 Share Posted September 27, 2010 Is there a suggestions form at w3.org? I want to suggest that selector.I'm not sure. I wanted to suggest a selector a while back (can't remember what it was now though ) and I didn't see anything. 'Course I didn't look very hard either. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.