06-07-2016, 07:14 PM | #1 |
Wizard
Posts: 1,071
Karma: 412718
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> |
06-07-2016, 09:01 PM | #2 |
Well trained by Cats
Posts: 29,804
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
It ain't hard.
File: import into book: <select file> It auto locates (in file browser)based upon extension Right click on the LINK TARGET html: select |
Advert | |
|
06-08-2016, 08:17 AM | #3 |
Wizard
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Sorry, I don't see how that relates to getting [CDATA] tags
I did that and all I got was another html file at the end. |
06-08-2016, 09:06 AM | #4 |
Zealot
Posts: 118
Karma: 10
Join Date: Dec 2008
Location: France
Device: None
|
I think you get this <![CDATA[ because you are in a xhtml file, and in your css you have this symbol >.
> is a special character in xml. CDATA is used to prevent errors when parsing the document. A way to say : "ignore all special characters in this section". If you don't want to see it, put your css in an external file, but as you said, it doesn't hurt. |
06-08-2016, 09:53 AM | #5 |
Wizard
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Ahhh - thanks
Calibre apparently inserts what it finds in the inline_toc_styles.css file when it makes an inline TOC so I was just modeling mine on the built in file (which doesn't have the <) My version gets used and the CDATA doesn't hurt, so all is well |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New to CSS | John123 | Workshop | 6 | 03-10-2013 08:00 AM |
ADE breaks CSS --> CSS Validation: Parse Error / Value Error | dasboeh | ePub | 4 | 12-10-2012 03:25 AM |
Override ePub CSS with userStyle.css? | barium | Sony Reader Dev Corner | 11 | 07-16-2011 03:25 PM |
epub CSS versus "Regular" CSS | konrad | ePub | 4 | 02-18-2011 09:29 AM |
css pseudo elements and adjacent combinators in extra css? | ldolse | Calibre | 2 | 12-21-2010 05:09 PM |