Home >Web Front-end >CSS Tutorial >How to Fix Misaligned Second Lines in Unordered Lists After a CSS Reset?
After applying CSS reset, you may encounter an issue where the second line of text in list items starts under the bullet. This misalignment can be resolved through CSS by adjusting the list-style-position property.
The list-style-position property determines whether bullets appear inside or outside the list. By default, it's set to "inside," causing text to wrap around the bullets. Changing it to "outside" forces the text to align with the rest of the list.
However, this can lead to misalignment between bullets and text outside the list. To address this, apply a margin to the list items:
ul li { list-style-position: outside; margin-left: 1em; }
ul { list-style-position: outside; margin-left: 1em; }
The above is the detailed content of How to Fix Misaligned Second Lines in Unordered Lists After a CSS Reset?. For more information, please follow other related articles on the PHP Chinese website!