![]() |
Sigil Nav.xhtml Line Break Issue
In my ebook nav.xhtml, below is the code I'm dealing with. I would like to have a blank space between the Preface and Part One of the book. However, any code I try to add to create a blank space or line (such as <br/>)does not work. I keep getting a parsing error. Should I pursue creating a different line class in my style sheet? Can anyone help? Thanks, Dave
<h1>CONTENTS</h1> <ol> <li> <a href="../Text/Section0008.xhtml#preface">Preface (Adam Davis)</a> </li> <li> <a href="../Text/Section0009.xhtml#one_part">ONE: BEYOND THE IMAGE</a> </li> |
Use CSS to set the formatting:
li {margin-top:2em} You should have a css stylesheet (something like "stylesheet.css") where you can put the code above. Then link that sheet be right-clicking on your html file(s) and selecting "link stylesheet". Point it to your stylesheet and...voila! edit: OH! And Welcome to MR!! |
Hi. Thank you! This is my first post. Er, that was. :)
Well, I tried that early on. But the issue is that I want extra space only in three places: between Part I, Part II, and Part III in the table of contents in the nav.xhtml file. I need to add a blank space between those three lines. In other words, I don't want to add extra white space between every entry in the contents. Does that make sense? |
Then you give those special cases a class name:
Code:
CSSYou can even go crazy and give them 'spiffy' ;) formatting just by changing the CSS like this: Code:
li {text-indent:2em}Cheers! |
You can find a lot of information about how to style/format your ebooks on the MR Wiki, the ebook production page, and a great tutorial reference page on W3Schools.
|
Or, just manually use
li style="margin-top:2em" instead of li for the few instances that require it. It's not 'best practice' but it works, and we all do it :-) |
Quote:
In Sigil, use the tool Table of Contents/Create HTML Table of Contents to make a page you can edit and format without consequence. Or copy the nav file to a normal xhtml file and format that if you want the list format. |
Actually the nav is epub3 but it can serve as both a machine-parsed html toc or a normal html toc depending on if you want it to be. I have seen nicely formatted navs used that are still machine readable and therefore able to replace the toc.ncx and html toc if needed nicely.
|
Quote:
It is better to learn the proper/easy/accepted way of doing it first...then they know when they are breaking the rules and why. |
Thanks, everyone. And, Turtle, that fix worked!
I had tried before to do something similar, create a special class, but for some reason it didn't work (probably a naming issue on my part). Again, your code worked. Many thanks! Can't say enough. Dave ps. I didn't get spiffy. But in the future, I might just. :) |
Quote:
I just wanted to say, I've had a really crap week. I was sick (over my damn weekend, of course) and this week has felt a million years long thus far. I really needed that laugh. Not that it's not absolutely true, mind you, but the laugh was perfect. TY for that. Hitch |
Sorry for the awful week - but glad I could lighten it somewhat!
Glad to help Dave - Cheers! |
| All times are GMT -4. The time now is 08:21 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.