padding-left
is what controls the indentation of ul
not margin-left
.
Compare: Here's setting padding-left
to 0
, notice all the indentation disappears.
ul {
padding-left: 0;
}
_x000D_
<ul>
<li>section a
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</li>
</ul>
<ul>
<li>section b
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</li>
</ul>
_x000D_
and here's setting margin-left
to 0px
. Notice the indentation does NOT change.
ul {
margin-left: 0;
}
_x000D_
<ul>
<li>section a
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</li>
</ul>
<ul>
<li>section b
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</li>
</ul>
_x000D_