-1

I have the following bullets for list items. How can I implement these bullets in CSS?

See image

enter image description here

Chris Hansen
  • 7,813
  • 15
  • 81
  • 165
  • Possible duplicate of [Can you style ordered list numbers?](http://stackoverflow.com/questions/23610151/can-you-style-ordered-list-numbers) – dippas Feb 26 '16 at 03:20

3 Answers3

3

From this answer, I edited it so it's what you wanted

CSS

body {
   counter-reset: item;
 }
 ol {
   list-style: none;
 }
 li {
   counter-increment: item;
   margin-bottom: 5px;
 }
 li:before {
   margin-right: 10px;
   content: counter(item);
   border-radius: 100%;
   border:2px solid #29465F;
   color:#29465F;
   font-weight:700;
   width: 1.2em;
   text-align: center;
   display: inline-block;
 }

HTML

<ol>
  <li>item</li>
  <li>item</li>
  <li>item</li>
  <li>item</li>
</ol>

Here's a fiddle

Community
  • 1
  • 1
Sam Chahine
  • 530
  • 1
  • 17
  • 52
1

https://jsfiddle.net/RajReddy/k36qjnq4/ Here is a working fiddle.

and the css styles are

 ol {
   list-style: none;
 }
 li {
    counter-increment: item;  
    margin-bottom: 5px;
 }
 li:before {
   margin-right: 5px;  
   content: counter(item);
   border-radius: 100%;
   border:1px solid; 
   width: 20px;
   text-align: center;
   display: inline-block;
 }
Rajshekar Reddy
  • 18,647
  • 3
  • 40
  • 59
0

You can make a circle with a number in it using assuming you are in a loop and have access to the index of the array:

<li>
    <span class="list-item-number">{{i+1}}</span>
    <span class="lite-item-value">{{item.name}}</li>
</li>

.list-item-number {
    border-radius: 100rem;
    width: 1rem;
    border: .2rem solid blue;
    background: white;
    text-align: center;
}
chovy
  • 72,281
  • 52
  • 227
  • 295