I have some nested unordered list, I need to apply my class ul-deactive to every element inside that div with tag <ul> <li> at any depth.
With my code I'm not able to make it work. Any idea what I'm doing wrong and how to fix it?
<div class="ul-deactive">
<ul>
<li>a
<ul>
<li>a-1 </li>
<li>a-2 </li>
</ul>
</li>
<li>b
<ul>
<li>b-1 </li>
<li>b-2 </li>
</ul>
</li>
</ul>
.ul-deactive ul li
{
list-style-type: none;
padding: 0px;
margin: 0px;
color:Fuchsia;
}
.ul-deactive ul liselects anyliwhich is a descendant (at any depth) of anyulwhich is a descendant (ditto) of an element with classul-deactiveul li { margin: 100px; }to reset this you would addul li ul li { margin: 0px; }