Ebook content pages are, as per ePub specifications, a bit bare bones, and if you do anything too crazy with them they can even break the book’s validation. There are a few simple rules you need to follow in order for them to be in compliance, which you will find in §22.2, Contents in Ebooks, in the user manual PDF. There isn’t much by way of formatting given to them by default.
That said, they are in essence just HTML, and thus can be styled with CSS. So long as the look you are going for is something that can be thought of as a universal design on the ToC, rather than individual lines being different from one another, you should be able to do that in the compile format designer, in the CSS pane.
- Double-click on the compile Format you are using, in the left sidebar of the compile overview area, and click on the CSS pane.
- In the left column you can add whatever formatting you want to the book.
For example, here is some CSS that makes the ToC look like this:
CSS for ToC...
The <nav> element is what ebooks use to describe the internal navigation of the book. And the whole ToC design will be within it. The .page-title class is something Scrivener adds to the heading on the page, by default, so since you’re doing something custom you may have a different style in use for it.
nav * {
text-align: center;
margin-left: 0rem;
padding-left: 0rem;
text-indent: 0rem;
}
nav {
width: 85%;
margin-left: auto;
margin-right: auto;
padding-bottom: 2rem;
border-bottom: 1px solid #000;
}
nav .page-title {
margin-top: 2rem;
margin-bottom: 2rem;
padding-bottom: 0.5rem;
font-size: 1.5rem;
border-bottom: 1px solid #000;
}
nav a {
text-decoration: none;
}
nav li {
margin: 0rem 0rem 0.65rem 0rem;
}
See also: Formatting TOC - #2 by AmberV