P粉0200855992023-08-23 21:12:32
list-style-position: inside
Works fine in most cases, unless you need multi-line bullets on small screens, as this will cause the text to align with the bullets instead of Aligned to the starting position of the text.
Keeping the default text-align: outside
, which allows a small margin and left-aligns the text to cover any centered containers, can solve bullet alignment problems.
ul, ol { margin-left: 0.75em; text-align: left; }
P粉0856897072023-08-23 00:14:09
You will need to use list-style-position
:
ul { list-style-position: inside; }