View Single Post
Old 02-15-2012, 01:09 PM   #1
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,181
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
CSS didn't work in Extra CSS field for my epub converstion

Hi,

Yesterday I was converting HTML to EPUB using the same settings I normally use and my css override codes didn't work in the Extra CSS field. (My heading tags didn't center, none of my paragraphs indented, and etc...)

I'm not sure if something changed in the last two Calibre updates or if something is wrong with my codes? The LRF and Mobi converted properly just not the epub.

Here is the Epub css override codes I normally use in the Extra CSS field:

body { margin: 0; }
a {text-decoration: none; color: black;}
a [href] {text-decoration: none; color: black;}
p {margin-top: 0pt; margin-bottom: 0pt; padding: 0pt; text-indent: 15pt; text-align: justify;}
h1 { text-align: center; padding-bottom: 20pt; page-break-before: always; }
h2 {text-align: center; font-weight: 600; font-size: x-large; padding-bottom: 20pt; page-break-before: always;}
h3 { text-align: center; padding-bottom: 20pt; font-weight: 600; font-size: xx-large; }
h4, h5 { text-align: center; padding-bottom: 10pt; }
h6 { text-align: center; }

EDIT: The only thing I changed recently beyond updating Calibre with newer versions is that I also updated the CSS in the fanfiction downloader plugin.

EDIT2: Solved the problem. In my original HTML files my <div style="text-align:center"> had smartquotes instead of regular quotes. As a result, it completely broke my css overrides.

Last edited by Amalthia; 02-16-2012 at 12:48 AM.
Amalthia is offline   Reply With Quote