Reputation: 125463
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>
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?
Upvotes: 3
Views: 6069
Reputation: 519
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.
Upvotes: -1
Reputation: 819
Add the property list-style-position: inside
to your ul rule and modify the margin and padding if necessary: http://jsfiddle.net/jFxLB/
Upvotes: 6