Inserting extra item 2A in HTML <ol> -


i'm sure must have been asked before, cannot locate it.

i'd create ordered list in items numbered 1, 2, 2a, 3, 4, …. have no choice on numbering must conform published standard inserted 2a correct omission in earlier version without renumbering.

obviously can use <dl> , put numbers in hand, , absent better solution i'll that; feels wrong. cannot <li value="2a"> attribute must number, , testing in firefox 37 "a" ignored. i've tried using li::before { content: '2a' } in css, evidently firefox doesn't use generate marker css 3 lists draft says.

any suggestions? don't mind solution works in relatively modern browsers.

you can try not rely on list-style-property on css counter-increment-property. this:

ol {list-style-type: none; counter-reset: section;}  li:before {      display: inline-block;      width: 2em;      text-align: right;      margin-right: 1em;      counter-increment: section;      content: counter(section) ". ";  }  li.special:before {      counter-increment: none;      content: counter(section) "a. ";  }
<ol>    <li>thing 1</li>    <li>thing 2</li>    <li class="special">thing 2 old</li>    <li>thing 3</li>  </ol>

you have apply .special-classes manually though , maybe need more "b" or "c". maybe worth shot.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -