03-07-2013, 07:52 AM | #16 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Best would be being able to use conditional CSS or the calc() function to set the margins...
Anyway, I just wanted to point that, contrary to logic, CSS px are not (should not be) real screen pixels, but, according to the CSS spec: px: pixel units — 1px is equal to 0.75pt. but even that can change depending on the exact resolution or the intended usage distance. Last edited by Jellby; 03-07-2013 at 07:56 AM. |
03-07-2013, 08:23 PM | #17 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
And pt is defined as 1/72nd of an inch. This, of course, is a pretty little lie, depending on screen resolution, but no more so than the definition of an inch as an inch, AFAIK. |
|
03-11-2013, 08:33 AM | #18 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Is there any way to specify the margins, indents etc. as a proportion of the page size rather than of the font size?
|
03-11-2013, 09:24 AM | #19 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
It's best with an ePub to set it up with no margins at all and then use an @ page like this... Code:
@page { margin-top: 5pt; margin-left: 5pt; margin-top: 5pt } For indents... Code:
p { margin-top: 0; margin-bottom: 0; text-indent: 1.2em } |
|
03-11-2013, 09:50 AM | #20 | |
Fanatic
Posts: 541
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Samsung Galaxy Tab 4 Nook & Samsung Galaxy Tab S 10.5
|
Quote:
If it is for commercial purposes, then I'd follow Jon's advice and go with something like 1-2 em for most indents and margins. - Byron |
|
03-11-2013, 10:48 AM | #21 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Not really. All you can do is specify them in relation to the container's size, which in some cases will be the page/screen. Note that according the spec, percentages in vertical margins should be interpreted in relation to the container's width, not height.
|
03-11-2013, 10:56 AM | #22 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
03-12-2013, 04:19 AM | #23 | |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Quote:
@page { margin-top:3pt; margin-bottom:4pt } body { ... margin-top:0; margin-left:5pt; margin-bottom:0; margin-right:5pt; ... } so that they are fixed irrespective of zoom level. For indents I use 12pt so that it does not increase with zoom level. For headers I use em vertical spacing so that it does zoom, e.g. h3 { font-size:1em; text-align:center; margin:1.5em 12pt 1em 12pt } I'm not sure why page margins relative to the actual device size, (e.g. 2%) would be wrong. If you took a page and enlarged/reduced it then the margins would enlarge/reduce accordingly, (in absolute terms), but remain at 2%. My fixed page margins work well on a 5" screen but may look very small on a 10", which is what the OP mentioned originally. Last edited by Agama; 03-12-2013 at 04:26 AM. |
|
03-12-2013, 06:54 AM | #24 | ||
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
@page { margin: 2mm; } /* or margin: 3pt 5pt 4pt 5pt; */ body { margin: 0; } I don't agree with JSWolf's suggestion that you don't need a bottom margin. It may be uncommon that the text reaches the bottom, but when it does you better make sure that there is some margin (if that's what you want). You need a bottom margin for exactly the same reason you need a right margin with non-justified text. Quote:
|
||
03-12-2013, 07:29 AM | #25 | |
Fanatic
Posts: 541
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Samsung Galaxy Tab 4 Nook & Samsung Galaxy Tab S 10.5
|
Quote:
You hit the nail on the head right there. They wouldn't be "wrong". It's just that Jon tends to be extremely opinionated and rude, calling anyone's opinions that differ from his as wrong or stupid. |
|
03-12-2013, 08:37 AM | #26 | |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Quote:
My main gripe with purchased ePubs has been huge indents in em, (3em - 5em), which soon gobble up lots of screen width on zooming. Maybe my 12pt fixed indent is an over-reaction, so I'll try 1.2em as JSWolf has mentioned. Last edited by Agama; 03-12-2013 at 08:40 AM. |
|
03-12-2013, 08:52 AM | #27 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
03-12-2013, 08:55 AM | #28 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Have you ever seen a 5% indent that actually looks good? It doesn't work. It's too big. And the bigger the screen, the bigger the indent.
|
03-12-2013, 09:26 AM | #29 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Quote:
I'm not sure why page margins relative to the actual device size, (e.g. 2%) would be wrong.
|
03-12-2013, 09:50 AM | #30 | |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
This shows why it is a good idea to keep style simple and compact. Simple styles are easy to understand and modify, if a user thinks the bottom margin is too large. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What the heck is a uPDF? | lhumble | 2 | 04-22-2011 12:46 AM | |
Troubleshooting Who the heck is Fernando?!? | LUW | Amazon Kindle | 4 | 10-28-2010 10:13 PM |
What the heck? | Dena | Kobo Reader | 9 | 09-27-2010 07:27 PM |
why the heck would you upgrade? | ThomasC | Amazon Kindle | 30 | 08-07-2010 06:44 PM |