CSS selector based on a:target -


this html:

<p class="define"><a class="term" href="#jump" name="jump">jump</a> - description</p> 

when browser jumps #jump want highlight .define class. if do;

a.term:target { background-color: #ffa; -webkit-transition: 1s linear; } 

i of course highlight a. how modify complete p? tried couple of variants 1 below, none of them work.

a.term:target .define { stuff here }

a.term:target p.define { stuff here }

a.term:target p { stuff here }

jsfiddle: http://jsfiddle.net/vvppy/

you can't modify parent of element using css. have use javascript alternative.


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -