![]() |
#16 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
Edit: On second thought, div {line-height: 1.0} might have an effect, as the kepub reader only overrides line-height for body, p, but I think it is just as likely to be a bad effect as a good one. Last edited by GeoffR; 11-03-2014 at 04:55 AM. Reason: kepub reader doesn't override line-height for div |
|
![]() |
![]() |
![]() |
#17 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 977
Karma: 3475832
Join Date: May 2012
Location: France
Device: Elipsa, Sage, Libra 2
|
Quote:
What I would like is for it to work when I use the convert button in Calibre and that is what I wanted advice on. Thanks to all for the advice. I'll try cybmole's with my margin settings. @cybmole: why do you eliminate adobe hyphenation? Last edited by anacreon; 11-03-2014 at 05:59 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Because I don't like the unintelligent way in which e-readers hyphenate. ( like part way through some character's surname)
I find myself wanting to check the source to see if the hyphen is supposed to be there ! Kindles don't hyphenate, neither did Sony T2 & older models, but when I briefly had a Sony T3, the bad hyphenation was driving me nuts until I found this css for disabling it. So I've used it ever since. Maybe Kobo hyphenates quite well, but I'm happier without. I think the kobo android app has a hyphens on/off toggle, ( or maybe that's only the mantano app ), but not the kobo e-reader, so I turn it off in the book & it's fixed for wherever I read. same with widows / orphans which fool me into thinking chapter end coming up - oh maybe not..... I strip all line height CSS entries also, as they interfere with device controls, but that has to be a manual edit. I never did find a one-line fits all extra css override Last edited by cybmole; 11-03-2014 at 07:08 AM. |
![]() |
![]() |
![]() |
#19 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 603
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
|
Quote:
This is what I usually define as my default preferences: Code:
body {
border-width : 0;
font-family : ACaslonPro, serif;
font-size : 100%;
font-style : normal;
font-variant : normal;
font-weight : normal;
line-height : normal;
margin : 0;
orphans : 1;
padding : 0;
text-align : justify;
text-indent : 0;
widows : 1;
}
div, p {
margin:0;
padding:0;
}
The other selectors you use should only describe what is different from your default settings. Not like this: Code:
.indent { margin: 0; padding: 0; text-indent: 1em; } Code:
.indent { text-indent: 1em; } This also makes or keeps the epub most flexible and all device features can be adjusted by the user. Like font adjustments, margin adjustments, etc. @page rule Use this rule only if you read in full screen mode. Only then the reader overrides the hard coded default top and bottom margins that Kobo has added to the firmware. As long the pageometer is still visible at the bottom of the screen you are not reading in full screen mode. As mentioned in other post(s) in this thread, most publishers include a @page rule to the CSS and therefore adding a @page rule is not necessary. If it needs tweaking, then modify the orginial @page rule. Don't use the @page rule to define a left and/or right page margin (margin-left: 5pt;margin-right: 5pt). This will cut off any character with a negative right side bearing. Last edited by Anak; 11-03-2014 at 07:53 AM. |
|
![]() |
![]() |
![]() |
#20 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#21 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
Code:
@page {margin: 12pt 0 0 0} div, p {widows:1; orphans:1;} There are some books where the above might not work because of the way the publisher has created the stylesheet, but those books can be fixed by using the Modify ePub plugin in Calibre to set the page margins (and remove the .xpgt file if necssary) before sideloading the book. My device is actually patched though, I use a custom footer in combination with a patch to make the top and bottom margins adjustable from the device. The photo was taken with the slider set to margin size 6, which is what I would normally use for reading epubs, but I can make all four margins bigger or smaller with the adjustment slider on the settings (Aa) menu. Edit: The advantge of patching is that I can switch between normal mode and full-screen mode and still have even top and bottom margins. (If you set the top margin by changing the book's stylesheet in Calibre, then it will only look balanced in normal reading mode. When you switch to full-screen mode the top margin will be much larger than the bottom margin.) Edit2: The above really only applies to epubs. If you convert to kepub then there is no need to add any margin, as the kepub reader has very large built-in margins as part of the header/footer in normal mode, and the top/bottom margin is adjustable for kepubs in full-screen mode without a patch. Last edited by GeoffR; 11-09-2014 at 12:40 AM. Reason: Advantage of patching is that margins are still balanced in full-screen mode ... |
|
![]() |
![]() |
![]() |
#22 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 76
Karma: 28488
Join Date: Sep 2013
Location: Bensalem, PA
Device: Nook Classic, Nook STG, Nook Color, Kindle, Kobo H2O
|
Good Evening - I have read the entire thread and I am a little confused / frustrated.
I'm not a CSS novice, although it has been a while since I have written anything that used CSS, I'm not sure what exactly what I should be doing with the libnickel.so.1.0.0.patch file. Am I placing this in the root directory of my H2O. All I want is to increase the top margin. For the most part the device is perfect for me, although it would be nice if my favorite font was listed. Thanks in advance to anyone who answers. Trice |
![]() |
![]() |
![]() |
#23 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
If all you want to do is add a small top page margin for standard epubs (not kepubs) then if you're a calibre user the Modify CSS config option in your calibre KOBOTOUCH driver may be a simpler solution. Just create/add something like @page {margin-top: 10pt} to a kobo_extra.css file in your Kobo root directory. As for having your favourite font listed in the font menu ... have you read post #1 of this Sticky thread? As long as you've named the fonts correctly, copied them to the correct Kobo /fonts directory and done a full power off/on you should be fine. |
|
![]() |
![]() |
![]() |
#24 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,786
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I know firmware 3.12.0 ignores px and pt as font size modifiers. Does it respect px and pt as margin modifiers?
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
CSS: margin-top and margin | Leonatus | ePub | 16 | 06-16-2014 04:29 AM |
Margin/word flow issues when converting from RAR(CSS?) to epub... | camobmus | Conversion | 0 | 06-20-2013 04:20 PM |
K5 Margin issues ? | wolw | Amazon Kindle | 1 | 08-12-2012 12:07 PM |
Question on Margin issues with OCR’d text processed for Kindle | Timmy_B | Workshop | 2 | 11-06-2010 04:31 PM |
calibre ignore margin-top and margin-bottom | bender | Calibre | 2 | 12-11-2009 06:58 AM |