Note that there are some explanatory texts on larger screens.

plurals
  1. POSeemingly over-complicated CSS list styling that SHOULD be easy
    primarykey
    data
    text
    <p>I need to create a style for ordered lists that follows this format:</p> <pre><code>(a) List Item 1 (b) List Item 2 (1) List Item 2.1 (2) List Item 2.2 (i) List Item 2.2.1 (ii) List Item 2.2.2 </code></pre> <p>Unfortunately, <code>list-style-type</code> doesn't work because there are no options that show the numbers as listed above, with parentheses.</p> <p>LOTS of researching has brought about nothing but ugly hacks, for example:</p> <pre><code>ol { list-style-type: none; } ol&gt;li:before { content: "(" counter(lvl1, lower-alpha) ") "; } ol li { counter-increment: lvl1; } ol ol&gt;li:before { content: "(" counter(lvl2, decimal) ") "; } ol ol&gt;li { counter-increment: lvl2; } ol ol ol&gt;li:before { content: "(" counter(lvl3, lower-roman) ") "; } ol ol ol&gt;li { counter-increment: lvl3; } </code></pre> <p>which works to some extent, removing the list numbering with <code>list-style-type: none;</code> and inserting the number surrounded with parentheses at the beginning of the <code>li</code>. This makes modifying other related styling horrific, as I can't figure out how to line things up nicely etc (I don't think its even possible). It also makes <code>list-style-position</code> redundant, because the numbers are ALWAYS inside the <code>li</code>.</p> <p>Basically, I'm looking for a way to reproduce this kind of list numbering in CSS: (note text alignment etc)</p> <p><img src="https://i.stack.imgur.com/W3D2w.png" alt="List Numbering Example"></p> <p>ANY help VERY MUCH appreciated!!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload