Change parent class of dom object via css selectors
Posted
by Le_Coeur
on Stack Overflow
See other posts from Stack Overflow
or by Le_Coeur
Published on 2010-05-06T14:17:10Z
Indexed on
2010/05/07
1:58 UTC
Read the original article
Hit count: 649
css-selectors
|css
Can i change parent class of some dom object on hover event via CSS selectors? For example I have such block:
<span class="wBlock" >
<span class="wText">Text</span>
<span class="wLink"/>
<\/span>
and if i move mouse to span "wLink" span "wBlock" must be changed, and if i move out than it must be the same as at the begining
.wLink{
padding-right:15px;
background:url(/img/addlink.png) center right no-repeat;
cursor:pointer;
}
.wText{
background-color: #1BE968;
}
It's something like this and if i move my cursor to plus text highlight must be changed to yellow
© Stack Overflow or respective owner