View Single Post
Old 08-13-2021, 09:34 AM   #3
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
I like to use inline TOCs

There's inline_toc_styles.css in

AppData\Roaming\calibre\resources\templates\inline _toc_styles.css

That allows some customization


Code:
li > ul {margin-bottom: 1em;
}

ul.level1 {
  padding-left: 0;
  font-weight: normal;
  font-size: 100%;
  margin-top: 1em;
  margin-left: 0;
  text-decoration: none;
}

ul.level2 {
  font-size: 100%;
}

ul.level3 {
  font-style: normal;
}

li {
  margin-top: 1em;
   list-style-type: none;
}

a { 
  text-decoration: none;
 color: black;
}

a:hover {
 border-top-style: solid;
  border-bottom-style: solid;
  padding-bottom: 2px;
 padding-top: 1px;
 border-top-width: 2px;
 border-bottom-width: 2px;
 color: white;
 background-color: black;
}
h2 {
  page-break-before: always;
  page-break-after: avoid;
  text-indent: 0;
  text-align: center;
  margin-top: 0;
  margin-bottom: 1em;
  font-size: 2.5em;
  font-weight: bold;
  font-style: normal;
  font-family: sans-serif;
}
phossler is offline   Reply With Quote