Hi Meredith,
Thank you for this topic! It might be helpful to share a screenshot so we have a better idea. A TOC usually has an ordered list since its in a specific sequence. Nested lists would start with a <li> tag for a Part, for example, which will then have a nested <ol> tag with the relevant items (chapters or headings) underneath, after which you would close the list with </ol> and the Part with </li>. The list style would be ‘none’ in the CSS if you don’t want bullets.
An example of nested TOC lists would be:
<nav epub:type="toc" role="doc-toc" aria-labelledby="toc1">
<h1 id="toc1">Contents</h1>
<ol class="none1">
<li><a href="00_Cover_Page.xhtml">Cover</a></li>
<li><a href="01_Halftitle_Page.xhtml">Half Title</a></li>
<li><a href="02_Title_Page.xhtml">Title</a></li>
<li><a href="03_Copyright_Page.xhtml">Copyright</a></li>
<li><a href="04_Contents.xhtml">Contents</a></li>
<li><a href="05_Acknowledgements.xhtml">Acknowledgements</a></li>
<li><a href="06_1___Partone.xhtml">1 | Part 1</a>
<ol class="none1">
<li><a href="06_1___Partone.xhtml#sec1">Heading 1</a></li>
<li><a href="06_1___Partone.xhtml#sec2">Heading 2</a></li>
<li><a href="06_1___Partone.xhtml#sec3">Heading 3</a></li>
</ol>
</li>
<li><a href="07_2___Parttwo.xhtml">Part Two</a>
<ol class="none1">
<li><a href="07_2___Parttwo.xhtml#sec1">Heading 1</a></li>
<li><a href="07_2___Parttwo.xhtml#sec2">Heading 2</a></li>
</ol></li>
<li><a href="15_Index.xhtml">Index</a></li>
<li><a href="16_About_the_Author.xhtml">About the Author</a></li>
</ol>
</nav>
Let me know if this works!
September 23, 2024 at 12:23 pm