Reputation: 5135
I'm trying to recreate this type (example 1, example 2) of menu list style, but I need it to be able to handle nested lists and I'm not sure how to do it. does anyone have any insight how I can do this?
ie (w/ minimal markup) :
<ul>
<li>one</li>
<li>two
<ul>
<li>two and half</li>
</ul>
</li>
</ul>
Thanks a bunch!!
Upvotes: 1
Views: 549
Reputation: 359776
I don't know what styles you're trying to apply, but I can get you started with empty CSS rules for each level:
ul { /* CSS properties here */ }
will let you style all ul
elementsul > li > ul { ... }
will override the applied CSS style for the inner ul
elements, because the selector has a higher specificityli
elements, use the rule li { ... }
for the outer li
elements, andul > li > ul > li { ... }
for the inner li
elementsDoes that help?
Upvotes: 1