bell notificationshomepageloginedit profileclubsdmBox

10% popularity   0 Reactions

There are a few things going on here. The spacing issue is likely being caused by the presence of block elements inside list elements—the headers are probably getting bumped onto their own line, apart from the start of the list item. If you're starting with the toc.xhtml of an epub file, you'll need to lose any elements inside the Table of Contents list (which must be in a <nav>) other than <span>, <a>, or <ol>. You've got a couple other minor problems that are probably from typing stuff in here, but to hit them quickly:

The closing <b> tags don't have a "/", making them opening tags
The first list item ends before the list inside it begins
The first <b> ends before the <h3> containing it ends

Try out the following:

<nav id="toc" epub:type="toc">
<ol class ="customBullet">
<li class="tier1"><a href="item1.xhtml">Item</a> <!-- 1st tier -->
<ol class="customBullet">
<li class="teir2"><a href="item1.xhtml#part1">Sub-item</a> <!-- 2nd tier -->
<ol class="customBullet">
<li class="teir3"><a href="item1.xhtml#part1_1">Sub-sub-item</a> <!-- 3rd tier -->
<ol class="customBullet">
<li class="teir4"><a href="item1.xhtml#part1_1_1">Sub-sub-sub-item</a></li> <!-- 4th tier -->
</ol>
</li>
</ol>
</li>
</ol>
</li>
<li>Item</li>
<li>Item</li>
<li>Item</li>
<li>Item</li>
<li>Item</li>
</ol>
</nav>

You could as easily give the class definition to each <ol>, and then have the CSS point to ol.tier3 li { color: blue; } or whatever styling you want— might be easier to read the code that way.

Hope that's useful!


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

Login to follow story

More posts by @Ashley

0 Comments

Sorted by latest first Latest Oldest Best

 

Back to top