I want to add a letter to an <li>
-element from a my under <ol>
like from my question:
body { counter-reset: item; }
ol.numbered_style li:before
{
counter-increment:item;
margin-bottom:5px;
margin-right:10px;
content:counter(item);
background:blue;
border-radius:100%;
color:white;
width:1.2em;
text-align:center;
display:inline-block;
}
ol.numbered_style.start_3{
counter-reset: item 2;
}
ol.none, ul.none,ol.numbered_style { list-style: none; }
<ol class="numbered_style">
<li>first</li>
<li>second</li>
<li>third Lorem Ipsum
<ol class="numbered_style start_3">
<li>missing an a after the number</li>
<li>missing a b after the number</li>
<li>missing a c after the number</li>
</ol>
</li>
</ol>
li::before { content: " a ";}
, but this didn't work. I also want a solution, in which adding in a second counter can generate the next elements with the following alphanumeric pattern like list-style-type: lower-alpha;
Try this out:
Sure, you can do anything that the
<ol>
can do.Counter List Style Types
REFERENCE
http://www.princexml.com/doc/5.1/counters/
SNIPPET