html5 - CSS 3 selector for parent tag? -
this question has answer here:
- is there css parent selector? 25 answers
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.
Comments
Post a Comment