The ordered list does not grow in firefox 57

I have a problem in Firefox 57 with ordered lists in html.

html is dynamically generated, but the example looks like this:

<ol>
  <li>ashdg</li>
  <li>ashdg</li>
  <li>ashdg</li>
</ol>

It has the following CSS

ol{
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    list-style-type: decimal !important;
    list-style-position: inside !important;
}

p, ul, ol {
    padding: 0;
    margin: 0;
    display: inline;
}

Firefox exit

Firefox Exit

Chrome exit

enter image description here

+4
source share
3 answers

display: inline, , Firefox. , , , , . inline , ol CSS. ( , ), , float display: inline.

ol{
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    list-style-type: decimal !important;
    list-style-position: inside !important;
}

p, ul, /* ol <-- remove this, if not necessary */ {
    padding: 0;
    margin: 0;
    display: inline;
}

/* add this, if necessary */
ol li {
    float: left;
}
<ol>
   <li>ashdg</li>
   <li>ashdg</li>
   <li>ashdg</li>
</ol>
Hide result
+8

this::

p, ul, ol {
    padding: 0;
    margin: 0;
    display: inline;
}

::

p, ul, ol {
    padding: 0;
    margin: 0;
}
+2

-moz ? moz-grid, -moz-appearance. , , . , css, ol ( -moz).


This doesn't make sense, but it looks like it display:inlinewill make it look like a "one-line list", and olin Firefox counting boxes from strings.

0
source

Source: https://habr.com/ru/post/1690122/


All Articles