html5 - CSS 3 selector for parent tag? -


this question has answer here:

on <a> :hover, need apply styles on div parent tag of <a>.

please note don't want use jquery/ java script, rather need using css/ css3.

jsfiddler: http://jsfiddle.net/yawer/2p6fl/

here code:

a:hover{ background-color:gray;  a:hover:parent{ border:none !important; } 

html:

<div style="width:200px; height:200px;border:solid 1px;">     <span style="width:180px; height:180px;border:double 1px red;">         <a style="border:dashed 1px green;" href="#">it test link</a>     </span> </div>  <br>     <br>         <div style="width:200px; height:200px;border:solid 1px;">          <a style="border:dashed 1px green;" href="#">it test link</a>  </div> 

edit: question refered here asked asked in 2011, m asking may in period development has happened.

you can try this:

span:hover{  border:none !important; } 

demo


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -