1

Suppose such a minimal snippet retrieved from database,

<ol>
    <li>Moview</li>
    <li>Music</li>
    <li>Drama</li>
</ol>

It displays as

  1. Moview
  2. Music
  3. Drama
I need to deactivate the linenums and the padding, shown as:

Movie
Music
Drama

Since the source data is inaccessible, is it possible to achieve it by define new css rules on ol?

AbstProcDo
  • 19,953
  • 19
  • 81
  • 138
  • Possible duplicate of [Need an unordered list without any bullets](https://stackoverflow.com/questions/1027354/need-an-unordered-list-without-any-bullets) – Joseph Webber Jul 13 '18 at 16:25

1 Answers1

3

Just set the list-style-type property to : none; on your ordered list and add padding:0; to remove indentation.

ol.style {
    list-style-type: none;
    padding:0;}
<ol class="style">
    <li>Moview</li>
    <li>Music</li>
    <li>Drama</li>
</ol>
Cameron Cole
  • 410
  • 1
  • 4
  • 20
  • Don't forget `padding:0` – zer00ne Jul 13 '18 at 16:27
  • It'd be more efficient to add the class to the `ol` then do `ol.style li`. – Joseph Webber Jul 13 '18 at 16:28
  • 1
    [This](https://stackoverflow.com/questions/1027354/need-an-unordered-list-without-any-bullets) post has a comment explaining that setting `list-style-type: none;` on `ol`/`ul` doesn't work in IE9. Instead it has to be set on the `li`. `margin: 0;` will have to be set on both `ol.style` and `ol.style li`. – Joseph Webber Jul 13 '18 at 16:42