html - target css of parent div -


this question has answer here:

say have following mark up

<div class="xxx yyy zzz"> <!-- div generated js , class names change time -->    <div class="aaa"> hello </div> </div> 

how can target css of parent div without knowing class name of parent div using css ?

ex: parent.aaa { background: #fff; } 

it's not possible target parent of element css. nice!

you use javascript find element , add class parent, style added class:

// javascript - jquery $(".aaa").parent().addclass("parentclass");  // css .parentclass {     ... styles ... } 

Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -