Reputation: 2367
how can I increase the margin between the numeral and the text in an ordered list?
i.e.
<ol>
<li>text 1</li>
<li>text 2</li>
<li>text 3</li>
</ol>
Produces
And I want
Where __ is an arbitrary indentation.
Upvotes: 0
Views: 1524
Reputation: 2367
Found the answer here
I modified the fiddle to work for what I needed.
ol {
counter-reset: item;
margin-left: 0;
padding-left: 0;
}
li {
display: block;
margin-bottom: .5em;
margin-left: 2em;
}
li:before {
display: inline-block;
content: counter(item) ".";
counter-increment: item;
width: 2em;
margin-left: -2em;
}
Upvotes: 1
Reputation: 11971
<ol>
<li><span class="indent">text 1</span></li>
<li><span class="indent">text 2</span></li>
<li><span class="indent">text 3</span></li>
</ol>
<style="text/css">
ol li .indent{padding-left:20px;}
</style>
Upvotes: 2