Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-16-2020, 12:36 AM   #1
Marc/o
Junior Member
Marc/o began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2020
Location: Québec
Device: Kindle PaperWhite
Unable to avoid EPUB to AZW3 extra margins

Hi, all. I am new to Kindle PaperWhite, relatively new to Caliber and brand new on this forum...

Speaking of margins, I meet the following problem :

Every single EPUB I convert to AZW3 seems to completely ignore any attempts I make at clearing the margins or setting them to 0 :

1) First, under page layout, the four margin boxes are filled with 5pts by default. Whether I leave them to 5pts or set them to 0, or even negative, to trigger the "No modication" value, which is supposed to leave the margins of the original EPUB, I always get the same result on the KindlePW : a margin of a few mm all around the pages of the ebook. Is this normal behavior or something going wrong?

2) Then when I try to fill the Extra CSS box under 'Styling' in 'Look & Feel', the conversion seems to add the right CSS in 0003.css, except the HTML pages do not link to 0003.css, so the styling is not applied to all pages.

My work around for now is that I systematically open all AZW3 files in Edit (T), open the 3 CSS files : 0001.css, 0002.css and 0003.css and add :

body { margin: 0 !important }

When I save and load the books on KindlePW, they are perfect with no extra border around them.

What should I do to avoid these extra manual steps and get it right immediately at the EPUB to AZW3 conversion stage? I found a few similar posts related to left-margin issues on EPUB to Kindle conversion, but didn't find a fix other than modifying the 3 CSS files manually (and repeating CSS, which is bad form, I know, but works in this case).

Thanks in advance for any help.
Marc/o is offline   Reply With Quote
Old 06-16-2020, 04:10 AM   #2
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: 74,379
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I've never done body { margin: 0 !important }. dies it override any other margins such as those for offset text or chapter headers?
JSWolf is offline   Reply With Quote
Advert
Old 06-16-2020, 12:32 PM   #3
Marc/o
Junior Member
Marc/o began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2020
Location: Québec
Device: Kindle PaperWhite
This line affects the entire body element and the !important rule makes this declaration override any other declarations (providing that one more specific doesn't also have the !important rule attached to it). Other elements inside the body can still have their own margins applied, inside the body box.

Applying this line to all three stylesheets of the AZW3 document (0001.css, 0002.css, 0003.css) seems to solve the margin problem on the Kindle. However, this has to be done manually after the conversion process.

Is there a way to achieve the same result directly at the moment of conversion? I thought it was the intent of the margin boxes or the Extra CSS box in Look & Feel.
Marc/o is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion epub-->azw3 with negative margins snoeki Conversion 60 12-07-2018 06:03 AM
epub to azw3 conversion and Extra CSS Section8 Conversion 8 02-06-2015 11:55 PM
Epub to AZW3, TOC margins off, text OK Ma'am-I-Am Conversion 0 10-18-2014 07:40 PM
cbr to pdf - avoid white margins on pages with different size oakwood Conversion 3 11-09-2013 09:52 PM
Unable to convert from EPUB to AZW3 jujubox7 Conversion 12 02-12-2013 01:43 PM


All times are GMT -4. The time now is 12:18 PM.


MobileRead.com is a privately owned, operated and funded community.