![]() |
#31 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,892
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Well formatted ebooks do not have a line-height property at all. The default is set by font metrics of selected font and if you set it in CSS, then it breaks almost all ereaders.
Only PDFs (and thus for POD or other publishing, or fixed layout for tablets) should have a line-height. Leave it undefined in Wordprocessor style and then conversion from docx to epub has no line-height in CSS. Amazon uses epub source to make mobi, azw3 and kfx. The CSS line-height and many other valid CSS only make sense on web pages, not ebooks! |
![]() |
![]() |
![]() |
#32 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,616
Karma: 145864263
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#33 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
If I could achieve what I want by not setting line-height and page margin, then I would do that. The fact that I can't I regard as also broken. |
|
![]() |
![]() |
![]() |
#34 | |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,892
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
Overall page margin has an app or ereader default (too large offset added in Kindle, so 0 is best). The line height has an app or ereader default. I hope you are not making a Print Replica ebook. They are a disaster. In just about every sane app & ereader (but note Kindle adds about 50 px to base L & R setting) the defaults work, but the user, the person reading, can set them. But certainly can't adjust line height if it's in the CSS on many readers. Of course the font face (metrics) and font size set a default line height on any sensible renderer so as descenders don't touch tallest item on line below. |
|
![]() |
![]() |
![]() |
#35 | |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,892
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
Only additional margins or indents from that for lists, quotations, letters, telegrams, first line of a not-first-paragraph, epigrams, marginalia, preambles etc. Maybe some not-centered-headings (but rare). Except if editing a Kindle ebook for personal consumption. Then I might be tempted to L & R -45px ![]() Padding top only used after forced pagebreak, like a chapter heading. no margins between ordinary paragraphs. |
|
![]() |
![]() |
Advert | |
|
![]() |
#36 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
As for page margin, I find it odd anyone should complain that 0.5em is breaking the device. A complaint that I am preventing someone adding 0.1 em less margin is odd indeed. Have you never seen an epub open with zero margin because using the epub's CSS value? Then you force the reader to fiddle with margin settings. |
|
![]() |
![]() |
![]() |
#37 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
Kindles are little better than a typewriter with single and double spacing, 1.5 if it's a good typewriter. I'm not trying to impress any leading decisions on a Kindle because it ignores them. But if a reader shows merit and finesse, like PocketBook Reader on Android, then why not cater for it with some CSS that is better than it can achieve on its own? It's not 'breaking' Kindles, and some other reader is hardly rendered completely useless by my decision. But if line-height is little more than a choice between too tight and too spaced for you, then I can understand you not setting it and relying on the device to perhaps come up with something just bearable. |
|
![]() |
![]() |
![]() |
#38 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,794
Karma: 168959602
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
As for the metrics of the fonts? Some fonts have a larger intrinsic line height than others. You can notice this when you leave the line height alone and notice that changing the display font also changes the white space between lines. You might want to check Deep dive CSS: font metrics, line-height and vertical-align for some visual examples using various fonts. |
|
![]() |
![]() |
![]() |
#39 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
On a web-page that is to be viewed on a smartphone 0.8em is pretty normal, sometimes more. |
|
![]() |
![]() |
![]() |
#40 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,616
Karma: 145864263
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#41 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,616
Karma: 145864263
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#42 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
What do you like for your margin then? Don't tell me 0.45em... |
|
![]() |
![]() |
![]() |
#43 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
|
Quote:
Code:
body, html { /* Basic Styling for HTML and BODY Sections of a File */ border-width: 0; height: 100%; margin: 0; orphans: 1; padding: 0; widows: 1; } |
|
![]() |
![]() |
![]() |
#44 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#45 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,616
Karma: 145864263
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The main issue is that you take away the reader's choice by imposing a 5.em margin.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Top-margin (bottom-margin?) for Kobo? | Notjohn | Sigil | 14 | 02-28-2015 06:43 AM |
CSS: margin-top and margin | Leonatus | ePub | 16 | 06-16-2014 04:29 AM |
CSS margin instead of margin-top, etc. | icallaci | Conversion | 24 | 10-19-2013 09:52 AM |
New conversion questions: Getting rid of huge left margin Epub to Mobi | geekgeek | Calibre | 2 | 08-31-2010 11:00 PM |
calibre ignore margin-top and margin-bottom | bender | Calibre | 2 | 12-11-2009 06:58 AM |