ul {
padding-left: 0;
list-style-position: inside;
}
Explanation:
The first property padding-left: 0
clears the default padding/spacing for the ul
element while list-style-position: inside
makes the dots/bullets of li
aligned like a normal text.
So this code
<p>The ul element</p>
<ul>
asdfas
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
without any CSS will give us this:
but if we add in the CSS give at the top, that will give us this: