Quote:
Originally Posted by mrmikel
I have been wrestling with tables of contents in html in which the first entry displays properly in an html editor and browser but in a converted lrf file the first entry is not fully to the left.
No doubt I am slow at this but I finally figured out what everyone else probably knows: Calibre indents the start of paragraphs by default. So if you use <p> at all, the behavior can be unpredictable if you are trying to line things up.
The solution is simple. Add text-indent: 0in; to your style statement at the top, or make sure that the first paragraph command in your table of contents is something like: <p class="toc;" style="text-indent: 0in;">.
This should also allow you to get rid of indents at the beginnings of all your paragraphs if you like that look better by including it in the style statement at the top of your html.
|
will have to try this for my TOC because having the first paragraph indented drives me nuts!
Normally, I open the HTML in Office 97 (I know it's old but seriously it's the only word that views html without adding a ton of garbage) and in HTML view I remove the <p> and save. When I open the HTML in Calibre and convert to LRF the <p> stays gone so the first chapter doesn't indent. But for some reason as soon as I close the file or switch to Word View it re-adds the <p>