View Single Post
Old 04-25-2019, 02:31 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,834
Karma: 8006102
Join Date: Mar 2015
Device: Kindle, iOS
I don't know about KFX, but for KF8, I add a media query so that it doesn't affect epub renderering engines.

Code:
@media amzn-kf8 {
	html {margin-left: -36px; margin-right: -36px; }
	}
Also, more specific margin-left and margin-right rules will override the above. So you need to look for and revise/delete things like:

Code:
p.para {margin-left: 0; margin-right: 0}
p.txt {margin:0}
This can get tedious.

To normalize line-height, I delete most, if not all, line-height rules to allow the Kindle to set the line-height per user settings.

ETA: Updated this post using <html> instead of <p>. When I first started playing with negative margins, <p> was the only thing that worked for me, but now <html> is working, not sure what changed. But I'm happy about it!

Last edited by odamizu; 08-27-2019 at 12:49 AM. Reason: updated info
odamizu is offline   Reply With Quote