I'd need to apply a style to paragraphs that are immediately after two nested unordered lists. I know the way to apply the style to a paragraph immediately after one ul would be:
.class ul+p
But I can't figure out how to narrow that down to only be in effect after two nested ul's? This is how I tried to do it, but it does not work:
.class ul ul + p
Code example:
.class ul + p {
color:red;
}
.class ul ul {
color:purple;
}
/* This is just an example of what I tried, does not work */
.class ul ul + p {
color:green;
}
<div class="class">
<ul>
<li>Item a</li>
<li>Item b
<ul>
<li>Item c (Nested list, CSS for this works fine)</li>
<li>Iten d (should be purple)</li>
</ul>
</li>
</ul>
<p>Paragraph after nested ul, this is the one I can't get to work,
what kind of CSS would I need? (should be green)</p>
<ul>
<li>item e</li>
<li>item f</li>
</ul>
<p>Paragraph after single ul, CSS for this works fine (should be red)</p>
</div>