I could use some assistance with CSS. I am in the process of creating a tree structure using many <ul>
and <li>
tags. The issue arises when I have multiple <li>
elements with a specific class, each containing an <img>
tag.
How can I target these <img>
tags within the <li>
elements based on their classes and assign different background images to them? I am unsure of how to correctly reference the <img>
tag associated with a particular <li>
class and then apply a background image.
Please note that the use of CSS3 is not permitted.
<ul>
<li class="leaf"><img></li>
<li class="leafhidden"><img></li>
</ul>