Question:
Despite attempts to reset margin, padding, and text-indent, the indentation in an unordered list (ul) remains. Is it necessary to resort to negative text-indent to eliminate this indentation?
Answer:
No, negative text-indent is not the only solution.
To remove indentation from a ul, set its list style and left padding to nothing:
ul { list-style: none; padding-left: 0; }
This inline example demonstrates the code's effectiveness:
<ul> <li>a</li> <li>b</li> <li>c</li> </ul>
The above is the detailed content of How to Remove Indentation from Unordered Lists Without Negative Text-Indent?. For more information, please follow other related articles on the PHP Chinese website!