Can I reduce the interval between lily numbers and content?

I want to reduce the distance between ordinals and contents, that is, I want to change:

1. foo 

in

 1. foo 

Possible? Normal <ol><li>...content</li></ol>

+7
source share
4 answers

try list-style-position:inside;

+4
source

You can do it with a range

 <ol> <li><span style="margin-left: -10px">near</span></li> <li>normal</li> </ol> 

You can also do something like this:

 <ol> <li style="text-indent: -5px">near</li> <li>normal</li> </ol> 
+2
source

It looks like you can increase the space with padding-left but not reduce it.

I believe that you will need to solve an alternative job, for example, wrap the contents of each list item with a div or span tag and give that tag a negative margin-left.

+1
source

Just for everyone, I had the same problem. The problem is that this is not a space or indentation, as you might think that you just need to edit the default margin set so ...

 <ol> <li><p style="margin-left: -30">content1</p></li> <li><p style="margin-left: -30">content2</p></li> </ol> 

hope this helps, it was pretty painful.

0
source

All Articles