View Single Post
Old 02-05-2012, 02:11 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,613
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
The anchor used in the TOC link is probably dropping you inside a header tag. That's a known bug when creating mobi (at least for the Kindle) files.

The link in the TOC should take you to an anchor before the chapter header. Ideally, the link in the TOC would be directly to an xhtml file with no anchor (one chapter equals one file in the epub), but if that can't be arranged... then have the link in the TOC go to an anchor point preceding the header tag.

TOC-link:
Code:
<a href="my-ebook.xhtml#chap1">Chapter One</a>


Anchor in my-ebook.xhtml the wrong way:
Code:
<h3 id="chap1">Chapter One</h3>
Anchor in my-ebook.xhtml another wrong way:
Code:
<h3><a id="chap1" href="toc.xhtml">Chapter One</a></h3>


Anchor in my-ebook.xhtml the "right" way (well, technically more like the "if you want it to work right" way):
Code:
<a id="chap1" /><h3>Chapter One</h3>
or
Code:
<a id="chap1" /><h3><a href="toc.xhtml">Chapter One</a></h3>

Last edited by DiapDealer; 02-05-2012 at 02:48 PM.
DiapDealer is online now   Reply With Quote