![]() |
#1 |
Member
![]() Posts: 10
Karma: 10
Join Date: Aug 2018
Device: kindle
|
Reduce margins and normalize line spacing
Hi guys! Is it somehow possible to reduce the margins more than what's available in the kindle settings? I've got some epub books which I convert to kfx (used to convert to azw) with Calibre. I tried a few different methods but to no avail...
Also I need to switch the line spacing everytime I change a book as the option is systemwide... If there is a way to set the line spacing when I convert the books it would be awesome! |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,612
Karma: 145863177
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Yes there is a way to reduce the margins. It works with KF8. But I cannot say if it works with KFX.
Code:
html { margin-right: -45px; margin-left: -45px; } You do have to remove the DRM from KF8 eBooks that have DRM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,819
Karma: 6769540
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; } } Code:
p.para {margin-left: 0; margin-right: 0} p.txt {margin:0} 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 |
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 10
Karma: 10
Join Date: Aug 2018
Device: kindle
|
Thanks! I already tried something similar, but with kfx files, and it didn't work. Will retry with kf8!
Last edited by mariowarner; 04-25-2019 at 03:53 PM. |
![]() |
![]() |
![]() |
#5 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Moved to the “Kindle Formats” forum.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() Posts: 10
Karma: 10
Join Date: Aug 2018
Device: kindle
|
Could you make a quick walkthrough? I opened Calibre, right click on a book, edit book, then I'm confronted with a lot of different File browser tabs. Which one do I have to edit to add the code, look for the rules that could override the code and delete the line-height?
It would be really appreciated ![]() |
![]() |
![]() |
![]() |
#7 | |
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,819
Karma: 6769540
Join Date: Mar 2015
Device: Kindle, iOS
|
Quote:
Good luck! Last edited by odamizu; 08-27-2019 at 12:50 AM. Reason: more detail |
|
![]() |
![]() |
![]() |
#8 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,000
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() line-height: 1.2 (or 120%) is a traditional standard There are occasions to use a different number, but those, IMHO, should be exceptions (eg 2 line chapter titles), bot the basic body of the work. |
|
![]() |
![]() |
![]() |
#9 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,519
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
>line-height: 1.2 (or 120%) is a traditional standard
And isn't that the default in Kindle? |
![]() |
![]() |
![]() |
#10 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,612
Karma: 145863177
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#11 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,612
Karma: 145863177
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#12 | |
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,819
Karma: 6769540
Join Date: Mar 2015
Device: Kindle, iOS
|
Quote:
As for -45px, I'm sure that works, too. I just use -36px as a matter of personal preference. |
|
![]() |
![]() |
![]() |
#13 |
Member
![]() Posts: 10
Karma: 10
Join Date: Aug 2018
Device: kindle
|
Hi guys and girls! So if I understand this, changing the line height in the CSS won't affect what's displayed on the kindle? Is the font size also default? It seemed to me that I had to change the settings between the books as the feel wasn't the same... Will have to check back to see if it's not my brain plalying tricks hehe!
Also I tried the 2 different methods for the margins, and only the <html> worked for me as the <p> lines would disappear after saving the editor. Weird he? Also thanks to all of you for taking the time to explain, I'm really grateful for that! ![]() |
![]() |
![]() |
![]() |
#14 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
![]() |
![]() |
![]() |
#15 | |
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,819
Karma: 6769540
Join Date: Mar 2015
Device: Kindle, iOS
|
Quote:
@mariowarner: What does this mean: "the <p> lines would disappear after saving the editor"? (I use Sigil rather than Calibre, so maybe it's a Calibre thing?) Last edited by odamizu; 05-04-2019 at 12:50 AM. Reason: typo |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to reduce line spacing int the main window ? | PO40600 | Library Management | 8 | 12-29-2015 04:15 PM |
How do I reduce line spacing when I have superscripts | jrjung | Conversion | 2 | 09-04-2015 03:36 PM |
Hack to reduce KF8 line height | JSWolf | Kindle Developer's Corner | 2 | 10-05-2014 05:06 PM |
Icarus 9.7 'Pdf Reader' app and spacing, margins and fonts | einkuser | Onyx Boox | 2 | 03-21-2014 08:04 PM |
Line Spacing and Margins | la3541 | Sony Reader | 0 | 06-02-2008 06:35 PM |