How to remove the dot after the number in the marker?

Asked

Viewed 326 times

-3

How I remove these points in the marker that is displayed after the item number from an ordered list:

<ol>
  <li>Lista 1</li>
  <li>Lista 2</li>
  <li>Lista 3</li>
  <li>Lista 4</li>
  <li>Lista 5</li>
</ol>

  • Felipe, I suggest you first read https://pt.meta.stackoverflow.com/questions/8045/guia-survivor%C3%Aancia-do-stack-overflow-em-inglés%C3%Aas to fit the Sopt community.

  • 1

    You want to remove only the point, thus maintaining the numbering?

  • 1

    @Danielmendes, yes!

  • 1

    I believe that there is no such style (of just numbers) by default in html, according to w3c

  • 1

    It is... Remove only the point, use the list-style-type: none; will remove everything, point and numbering, but only know this.

1 answer

1


To remove the point after item numbering is a somewhat complicated process but it is possible to do so. Use the CSS code below, this will take the point of the number the way you want it:

ol { 
    counter-reset: item;
    list-style-type: none;
}

li { 
    display: block; 
}

li:before { 
    content: counter(item) "  "; 
    counter-increment: item;
}
<ol>
  <li>Lista 1</li>
  <li>Lista 2</li>
  <li>Lista 3</li>
  <li>Lista 4</li>
  <li>Lista 5</li>
</ol>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.