![]() |
#16 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
I didn't understand until recently the recommendation I received in this forum not to use margin for spacing, but padding instead. In web design this makes no sense, but in ebooks I came across a good example recently in the PocketBook Reader in Android. I altered the margin all around the page and this completely destroyed the margins I have been using to space type. On changing it to padding instead I could alter the page margin without any effect on my spacing.
As for line-height, I experimented with removing, but have reinstated, as without line-height being set you may end up having no choice but too tight or too spaced. It is the case on the above-mentioned reader for example. But if you set line-height (in em) to what you think is aesthetically desirable then this is reflected in the reader, effectively giving you access to inbetween measures that are in any case relative to the font size, if you alter it. As for default units, I have seen people use pt in ebooks, which so far as I know is solely a print measure. I always use em. 12pt only equals 1em for 12pt type. For 10pt type 1em is 10pt. I have no idea how ereaders use pt, or whether they do, but em is better as a relative unit. |
![]() |
![]() |
![]() |
#17 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
Code:
hr.transition { margin: 1.5em 40% 1.55em 40%; border: 0; border-bottom: 1px solid darksalmon; } |
|
![]() |
![]() |
Advert | |
|
![]() |
#18 | |||
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,621
Karma: 145864263
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Quote:
Quote:
So please don't fool around with margins or line height. Leave L/R margins at 0 and no added line height. And also don't add in paragraph spaces. You will make the reading experience better for more people then you would doing it the way you said earlier in this post. This is from experience. |
|||
![]() |
![]() |
![]() |
#19 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,621
Karma: 145864263
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
As for padding, you don't need it just in case someone decides to change the L/R margins. That is handle properly. I know Kobo handles it properly. As for @page, get rid of it. It's not needed. Don't monkey with the margins. Let us set our margins. As for padding, it's best used for a section break where you are just using blank space. Otherwise, there's very little need to use padding. Last edited by JSWolf; 08-31-2022 at 06:25 PM. |
|
![]() |
![]() |
![]() |
#20 | |||||||
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
|||||||
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Aesthetics is a moveable feast. I have tried your 0.9em suggestion. At first I thought, no, too crammed. But then looking at it I thought, hmmm, maybe.
One can do no more than say one is willing to rethink everything. That is the only way to decide, to discount or accept ideas after living with them for a while. |
![]() |
![]() |
![]() |
#22 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
|
Quote:
Code:
hr { /* Thematic break to use 3 asterisks between parts of story */ margin-top: 0.9em; margin-bottom: 0.9em; border: none; } hr::before { content: "***"; display: block; text-align: center; } You mentioned padding on an epigraph page. Could you post your padding settings for that? @JSWolfe: you mentioned @page. I just leave what Calibre sticks in there. Code:
@page { margin-top: 0; margin-left: 0; margin-right: 0; margin-bottom: 0; } EDIT: And for padding in hr, are you saying I should be using padding-top/padding-bottom set to 0.9em each instead of margin-top/margin-bottom? Last edited by enuddleyarbl; 08-31-2022 at 09:30 PM. |
|
![]() |
![]() |
![]() |
#23 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#24 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#25 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
Code:
p.epigraph { padding-top: 8em; text-indent: 0; text-align: center; } p.epigraph1 { padding-top: 0.8em; text-indent: 0; text-align: center; } p.epigraph2 { padding-top: 2em; text-indent: 0; text-align: center; } p.epigraphleft { padding-top: 8em; text-indent: 0; text-align: left; } p.epigraphright { padding-top: 0.8em; padding-right: 1em; text-indent: 0; text-align: right; } I originally had the padding as margins, but altering the margin of the page in an ereader can totally collapse an epigraph margin so it's now at the top of the page instead of where I want it to be. By using padding it is unaffected. Last edited by bookman156; 08-31-2022 at 10:03 PM. |
|
![]() |
![]() |
![]() |
#26 | |||||||
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,621
Karma: 145864263
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Quote:
Quote:
Code:
hr { margin-top: 0.9em; margin-right: 40%; margin-bottom: 0.9em; margin-left: 40%; border-top: 2px solid; } Quote:
Quote:
Quote:
Quote:
|
|||||||
![]() |
![]() |
![]() |
#27 | ||
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#28 | ||
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,621
Karma: 145864263
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Quote:
The way I have mine set, 0.5em would be larger then I have it. I have it close to the edge, but not at the edge. |
||
![]() |
![]() |
![]() |
#29 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#30 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,621
Karma: 145864263
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |