View Single Post
Old 06-26-2025, 04:22 PM   #8
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 782
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Sage
I could be misunderstanding what you're looking for. But, how about this?
Click image for larger version

Name:	20250626 -- Nested Lists.JPG
Views:	32
Size:	54.7 KB
ID:	216515

The HTML (keeping track of the various nestings of the ul and li elements is a pain in the Calibre Editor -- and EDIT: I mistakenly used the ul (unordered list) instead of ol (ordered list). But, it still seems to work.):
Code:
<p class="headline">Nested Lists</p>

  <p>Lists can be nested by simply putting the nested list immediately following an earlier list’s element (put that element’s closing tag AFTER the nested list’s closing tag):</p>

  <ul class="ol_arabic">
    <li>Coffee
    <ul class="ol_lowalpha">
      <li>with cream
      <ul class="ol_lowroman">
        <li>dairy</li>
        <li>non-dairy</li>
      </ul></li>
      <li>with sugar
        <ul class="ol_lowroman">
          <li>sucrose</li>
          <li>glucose</li>
        </ul></li>
    </ul></li>
    <li>Tea
      <ul class="ol_lowalpha">
        <li>Black tea</li>
        <li>Green tea</li>
      </ul></li>
    <li>Milk</li>
  </ul>
The CSS:
Code:
.ol_arabic {
  /* Ordered List Class for Arabic Numbers (Safer to use UL) */
  display: block;
  list-style-type: decimal;
  margin-left: 1.2em;
  margin-right: 1.2em;
}
.ol_lowalpha {
  /* Ordered List Class for Uppercase Alphabetic "Numbers" (Safer to use UL) */
  display: block;
  list-style-type: lower-alpha;
  margin-left: 1.2em;
  margin-right: 1.2em;
}
.ol_upalpha {
  /* Ordered List Class for Uppercase Alphabetic "Numbers" (Safer to use UL) */
  display: block;
  list-style-type: upper-alpha;
  margin-left: 1.2em;
  margin-right: 1.2em;
}
.ol_uproman {
  /* Ordered List Class for Uppercase Roman "Numerals" (Safer to us UL) */
  display: block;
  list-style-type: upper-roman;
  margin-left: 1.2em;
  margin-right: 1.2em;
}
.ol_lowroman {
  /* Ordered List Class for Lowercase Roman "Numerals" (Safer to us UL) */
  display: block;
  list-style-type: lower-roman;
  margin-left: 1.2em;
  margin-right: 1.2em;
}

Last edited by enuddleyarbl; 06-26-2025 at 05:38 PM.
enuddleyarbl is offline   Reply With Quote