how do I get the bullet points of a <ul> to center with the text?
Add list-style-position: inside
to the ul
element. (example)
The default value for the list-style-position
property is outside
.
ul {
text-align: center;
list-style-position: inside;
}
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
Another option (which yields slightly different results) would be to center the entire ul
element:
.parent {
text-align: center;
}
.parent > ul {
display: inline-block;
}
<div class="parent">
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</div>
You can do that with list-style-position: inside;
on the ul
element :
ul {
list-style-position: inside;
}
See working fiddle