
: Re: custom bullets html ebook kindle I am creating an ebook for Amazon's Kindle in HTML, and then later use KindleGen to convert it into the Kindle's MOBI version. The problem I am currently
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
More posts by @Ashley

: Can I make custom fonts show up in iBooks? Is it possible to include custom fonts in an ebook and have them show up in iBooks, or can you only use the various default fonts listed on the