Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you hide the dot after the bullet number in an ordered list? [duplicate]

Tags:

Initially, I thought I could use :first-letter in CSS, legacy browser support aside, but I don't think the bullet numbers technically exist in the DOM. Assume I'm not going to use bullet list images or background images.

So something like:

  1. Apples
  2. Bananas
  3. Oranges

would become

  1 Apples
  2 Bananas
  3 Oranges

like image 201
chimerical Avatar asked Feb 14 '11 20:02

chimerical


People also ask

How do you hide the dots in a list?

Adding the "list-style: none" CSS class to the unordered list (<ul>) or ordered list (<ol>) tag removes any bullet or number.

How do I remove a dot from a CSS list?

In some cases, we are required to remove the bullets of unordered and ordered lists. The removal of the list bullets is not a complex task using CSS. It can be easily done by setting the CSS list-style or list-style-type property to none.


1 Answers

From this answer, it appears that the answer is:

ol {      counter-reset: item;     list-style-type: none; } ol li { display: block; } ol li:before {      content: counter(item) "  ";      counter-increment: item; } 

SEE ALSO: http://jsbin.com/ukojo4/

like image 119
Sean Vieira Avatar answered Sep 29 '22 21:09

Sean Vieira