From within an HTML formatted eBook, I am trying to get the Calibre Ebook viewer to display each of my chapters with the chapter heading at the top of the viewing page when I click on a link in my TOC. I am trying to do this w/o Xpath, but entirely within the HTML so that when I take a book that has been converted from HTML to the epub format by Calibre and send it to my eReader, I will hopefully get the same behavior there as in Calibre.
Thus far, with one exception, I have been able to get all my TOC links working from within HTML such that when I click on a link in the TOC from within the viewer, the chapter heading shows at the top of the viewing window (all my HTML tags for chapter headings are <H3> & </H3>). The exception places the chapter heading at the bottom of the viewing window and not at the top. I did some research by cracking open the epub and looking at the HTML files in there. I discovered that the exception is occuring because the chapter heading is at the very bottom of one of the HTML files and the body of the chapter is at the top of the next HTML file in the sequence.
I am not certain that continuing to manipulate the HTML tags in the eBook file can get around this. Kovid, what would you suggest I do? or is there anything I can do in this situation to correct this? If the chapter heading is in one file and the body of the chapter is in another, displaying the chapter heading at the top of the viewing window would result in what amounts to a blank page since it appears that the viewer can only have one file opened at a time.
Looking forward to a solution to this issue.