![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 655
Karma: 5078890
Join Date: Feb 2014
Device: Kobo Glo (deceased), Kindle 4th, Kindle Basic 10th Generation
|
Margins, CSS, and the Glo.
The last time I was forced to learn html was back in my senior year of high school. The time when CSS was important because of friendster...
Anyway, lately, I've been learning some basic CSS stuff to edit some books that I'm reading. Either they have too much margin, or too much space between paragraphs, or there's no indentation. So I make it a habit to edit the poorly formatted books that I have. They worked great before, but now, with a particular book, there have been some characters that were cut off when displayed on my Glo. I know that there have been some reports where some italicized letters (like 'f') are cut off when placed at the right margin. Now, though, it seems worse. Some regular formatted letters are cut off, sometimes a whole letter itself is missing. And for some reason, when I highlight the word, it doesn't give me a dictionary pop-up. But when I click add note, the word is recognized properly. I just can't think of anything that might've caused this. My Glo's margin slider is all the way to the left, but even if I increase it, it will sometimes leave some lines going through the margin. Here's the CSS that I use. It's pretty much basic, just enough to correctly format the text so they'll look more like books... Code:
p { text-align: justify; text-indent: 1.5em; line-height: 100%; margin: 0 0; } p.first { text-align: justify; text-indent: 0em; line-height: 100%; margin: 0 0; } Last edited by hleo12; 08-13-2014 at 09:20 AM. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
The only time I notice this is with kepubs, sideloaded or purchased, and when I have the hidden full screen reading option turned on. I don't justify the text, but I think it makes this problem worse.
As to styles, the ones that get into all my books are: Code:
body { display: block; margin-bottom: 0; margin-top: 0; text-indent: 1.2em; } p { margin-top: 0; margin-bottom: 0; text-indent: 1.2em; widows: 1; orphans: 1; } .sceneBreak { margin-top: 2em; text-indent: 0; } h2 + p, h3 + p, h4 + p, hr + p { text-indent: 0; } |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Code:
.epub { display : block; font-size : 1em; margin : 0 0 0 0; padding : 0 0 0 0; text-align : left; widows : 1; orphans : 1; -epub-hyphens : auto; -webkit-hyphens : auto; adobe-hyphenate : auto; } David |
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
|
![]() |
![]() |
![]() |
#5 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 655
Karma: 5078890
Join Date: Feb 2014
Device: Kobo Glo (deceased), Kindle 4th, Kindle Basic 10th Generation
|
Quote:
On a different note, has there been any work-around for the fullscreen text cutoff with KePubs? |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You don't need a line-height of 100%. It can be removed.
|
![]() |
![]() |
![]() |
#7 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 655
Karma: 5078890
Join Date: Feb 2014
Device: Kobo Glo (deceased), Kindle 4th, Kindle Basic 10th Generation
|
Thanks guys... I'll be sure to steal those CSS codes... On a happier note, it seems that it really was only happening in that particular book.
|
![]() |
![]() |
![]() |
#8 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
When you have a problem, the thing to do is to check out that particular ePub. There are lots of way to improperly code the CSS.
|
![]() |
![]() |
![]() |
#9 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Regards, David |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Margins css changed in v1.27? | VirgoGirl | Calibre | 4 | 04-02-2014 12:32 PM |
userstyle.css and epub margins | tselling | Sony Reader Dev Corner | 8 | 10-28-2010 01:51 PM |
Is there a way to over ride CSS Margins | gandor62 | Calibre | 0 | 09-21-2010 09:40 PM |
css override code for margins? | Amalthia | Calibre | 15 | 08-11-2009 07:20 PM |