Border around li tag

Markinhos picture Markinhos · Oct 12, 2012 · Viewed 77.2k times · Source

Is there any way that the border in a li tag includes the number and not just the content?

Here is the jsfiddle of what I am trying to do: http://jsfiddle.net/Markinhos/VSnnd/8/

I want the border includes the number two.

Answer

Giona picture Giona · Oct 12, 2012

Add list-style-position:inside;

.borderlist {
    list-style-position:inside;
    border: 1px solid black;
}