View Single Post
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,834
Karma: 8006102
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