Jump to content

child:hover parent {}


10 weber

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...