0

I would like to to apply a different style to ul, if within its li there is a input tag

So the first list should look different from the second one. How to achieve this in regular CSS with no JS?


<ul>
    <li><input disabled="" type="checkbox"> Item unchecked</li>
    <li><input checked="" disabled="" type="checkbox"> Item checked</li>
</ul>

<ul>
    <li>Item unchecked</li>
    <li>Item checked</li>
</ul>
Julian
  • 1,592
  • 1
  • 13
  • 33
Radex
  • 7,815
  • 23
  • 54
  • 86

0 Answers0