View Single Post
Old 01-22-2015, 08:27 PM   #22
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,915
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by pssquirrel View Post
@Section8: Ah. I see what's happening now.

My source material is epub. I delete all margin-left:0 and margin-right:0 so that it uses the epub reader defaults. To get azw3, I convert epub > azw3 using Calibre and add negative margins in the Extra CSS section.

If I add negative margins to p, div, h1, h2, etc. everything works out fine.

If I use body or html, Calibre will sometimes (but not always) add margin-left:0 and margin-right:0 to the <p> elements, which overrides the negative <body> and <html> margins, rendering them useless.

I don't know how Calibre determines when to add margin-left:0 and margin-right:0 to <p>. If anyone has any clues, I'd be curious. However, I have no problem adding negative margins to <p> elements to get the desired results, and it's working fine.

@EbokJunkie: Thanks for your recipe, but I'm on a Mac!
What I have done is convert ePub > AZW3 and then in the Book editor, I replace all left and right margin of 0 to -30px and it works.
JSWolf is offline   Reply With Quote