I want a styled list that doesn’t have a margin-left on the first level.. But does on subsequent, leveled sublists.. Anyone know how to do this?
<ul>
<li>no margin</li>
<li>
<ul>
<li>yes margin</li>
</ul>
</li>
</ul>
(without adding css classes to the first level of ul or changing any of the code)
Is the first ul a direct descendant of the body? I know you said not adding css classes to the code but I presume adding stuff to a stylesheet is not out the question?
If so you could use a style declaration like:
or if you know a div it does sit within:
There may also be default padding you need to consider.
Thanks