Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 12-30-2015, 05:52 PM   #1
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,603
Karma: 4798866
Join Date: Mar 2015
Device: Kindle, iOS
Margins: % or em ?

My source material is EPUB, which I then convert to dual-mobi via Calibre.

I typically set top and bottom margins around chapter heads. I used to use %, then discovered this resulted in missing chapter heads and text in the mobi portion (though the kf8 portion is fine). Switching to em solved this problem.

When I looked in the Kindle Publishing Guidelines, I found: "When using the margin and padding CSS properties, specify the values in percentage (%) instead of em units" (section 3.1.7 on page 15).

Does anyone here use % with margins such that it works with both mobi and kf8? Any idea what I might be doing wrong?

Examples
Spoiler:
This results in missing chapter heads and text when converted to mobi (but works fine in kf8):
Code:
h1 { 
font-size: 120%; 
margin-top: 20%; 
margin-bottom; 10%; 
text-align: center;}
But if I change it to em, it works for both mobi and kf8:
Code:
h1 { 
font-size: 120%; 
margin-top: 2em; 
margin-bottom; 1em; 
text-align: center;}
odamizu is offline   Reply With Quote
Old 12-31-2015, 12:15 AM   #2
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
I usually use % for margin-top and ems for margin-bottom. This gets me closest to the way I'd have designed for print, and I haven't run into any problems yet.
phillipgessert is offline   Reply With Quote
Advert
Old 12-31-2015, 01:36 PM   #3
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,603
Karma: 4798866
Join Date: Mar 2015
Device: Kindle, iOS
Thanks phillipgessert! I will experiment now that I know % can work.
odamizu is offline   Reply With Quote
Old 01-01-2016, 05:54 PM   #4
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,603
Karma: 4798866
Join Date: Mar 2015
Device: Kindle, iOS
Looks like this is a Calibre issue rather than a mobi problem. When I tried KindleGen, everything works fine. I started a new thread in the Calibre forum: https://www.mobileread.com/forums/sho...d.php?t=269358

Thanks for pointing me in the right direction.
odamizu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No margins with PW 5.4.0? Belenos Kindle Developer's Corner 6 03-05-2015 12:40 PM
PW - Margins Dr_Raspy Amazon Kindle 6 01-24-2013 03:45 AM
Help with margins Switch Calibre 3 04-30-2010 02:53 AM
Margins cklammer EPUBReader 0 12-07-2009 02:55 AM


All times are GMT -4. The time now is 09:46 PM.


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