View Single Post
Old 04-11-2011, 10:44 AM   #21
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,560
Karma: 20150435
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
The href="#book_title" works if the target is in the same file inside the .epub. Otherwise, you need to give the path to the other file, like this:

In toc.xhtml (for instance):
Code:
<a href="book1.xhtml#book_title">Go to Book Title</a>
(this says: go to file book1.xhtml and there find the element with id="book_title")

and in book1.xhtml:
Code:
<h1 id="book_title">Book Title</h1>
It should not matter (for the link to work) whether the element is an <a> or an <h1>, unless something is really buggy in between.

Validating with FlightCrew (in Sigil) should tell you if there's anything wrong.

Last edited by Jellby; 04-11-2011 at 10:47 AM.
Jellby is offline   Reply With Quote