This question already has an answer here:
Is there any way to remove the DOT after the decimal numbers in List style?
My CSS
.snum li {list-style:decimal outside none;}
The result i was getting like this (not including PHP and HTML code)
1. MILK
2. SOYA
3. BEANS
4. GARLIC
Desired Outpiut should be like this.
1 MILK
2 SOYA
3 BEANS
4 GARLIC
</div>
You can do this by implementing a custom counter as a pseudo-element before each <li>
on your ordered list:
<ol>
<li>STUFF</li>
<li>Stuff</li>
<li>Stuff</li>
</ol>
ol
{
list-style: none;
margin-left: 0;
}
li
{
counter-increment: custom;
}
ol li:before
{
content: counter(custom) " ";
}
ol li:first-child {
counter-reset: custom;
}