This is my HTML:
<div class='class1'>
<div class='class2'>
<div class='class3'>
<a class='link' href='alink'>Go somewhere</a>
</div>
</div>
<div>
What i need to do is apply a CSS class to the div that have class2, but only if they have a div with class3 inside;
.class1 .class2 ".....class3"{
border: 1px black;
}
If class2 don't have a div inside with class3 i need to apply another CSS class:
.class1 .class2{
border: 0;
}
Thanks.