Add the property list-style-position: inside
to your ul rule and modify the margin and padding if necessary: http://jsfiddle.net/jFxLB/
left align for list style type
-
07-07-2023 - |
Pergunta
I have a simple list with list-style-type: lower-latin;
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
<li>four</li>
<li>five</li>
</ul>
CSS
ul
{
list-style-type: lower-latin;
}
The problem is that by default, the list-style-type is right-aligned:
How can I make the letters left-align with css?
Solução
Outras dicas
Try this code:
<html>
<head>
<style>
ul
{
list-style-type:lower-alpha;
}
</style>
</head>
<body>
<ul dir="rtl" style="text-align:left;">
<li>coursesweb.net</li>
<li>www.marplo.net</li>
<li>www.php.net</li>
</ul>
<ol dir="rtl" style="text-align:left;">
<li>Free courses</li>
<li>Tutorials</li>
<li>Lessons</li>
</ol>
</body>
</html>
Thanks.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow