View Single Post
Old 06-07-2016, 07:14 PM   #1
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
inline_toc_styles.css

To have my own CSS used when I make an inline TOC, I created my own styles and put my inline_toc_styles.css into AppData\Roaming\Calibre\resources\templates

1. I took a guess about where to put it since I couldn't find info in the users manual (and for once I guessed right)

2. I get CDATA tags for some reason. They don't seem to hurt, but I wonder why I get them

Code:
  <style type="text/css"><![CDATA[
  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: italic;
  }
  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;
  }
  ]]></style>
phossler is offline   Reply With Quote