![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,853
Karma: 13432974
Join Date: Nov 2010
Device: Kobo Clara HD, iPad Pro 10", iPhone 15 Pro, Boox Note Max
|
These uncentered section breaks are driving me nuts…
It’s probably a bit extreme to be so bothered by this, but it is bothering me.
![]() I assume that this is the crengine’s doing, and maybe it’s because of the odd number of characters, but is there any way to improve this centering? Maybe I can add some custom css? https://imgur.com/a/OesiJCY |
![]() |
![]() |
![]() |
#2 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Pretty sure the "center" class is missing a "text-indent: 0", so it has some (default or inherited) indent.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,853
Karma: 13432974
Join Date: Nov 2010
Device: Kobo Clara HD, iPad Pro 10", iPhone 15 Pro, Boox Note Max
|
Interesting observation — I might try some custom CSS on the center class to see if I can improve that — or a negative indent as there doesn’t seem to be much else centered in this book.
|
![]() |
![]() |
![]() |
#4 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,750
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Try the following CSS code. It should work.
Code:
.sectionbreak { margin-top: 0.8em; margin-bottom: 0.8em; text-align: center; text-indent: 0; } |
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,853
Karma: 13432974
Join Date: Nov 2010
Device: Kobo Clara HD, iPad Pro 10", iPhone 15 Pro, Boox Note Max
|
Quote:
![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,853
Karma: 13432974
Join Date: Nov 2010
Device: Kobo Clara HD, iPad Pro 10", iPhone 15 Pro, Boox Note Max
|
So, I changed p.center to be left aligned and it was not quite left aligned, no matter how I tried to play with margin/border/padding, whether explicit zero values or reset/unset. I did find, though, that if I used the HTML5 (html5.css) built-in style instead of the HTML/EPUB (epub.css) that it centers much closer to where I’d expect it to be. I’ll review those two CSS files when I get time and access to a real computer, but it looks like it’s something in the KOReader CSS files that’s doing this.
|
![]() |
![]() |
![]() |
#7 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,751
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,853
Karma: 13432974
Join Date: Nov 2010
Device: Kobo Clara HD, iPad Pro 10", iPhone 15 Pro, Boox Note Max
|
OK, I figured it out by cloning the github repo and looking through the css files.
In epub.css (unlike html5.css) I found this: Code:
/* Block elements */ p { text-indent: 1.2em; margin-top: 0; margin-bottom: 0; } Code:
p.center { text-indent: 0; } ...and it's now properly centered. I'm wondering whether this is something that should be in the global css file, or whether the text-indent should be removed from the global paragraph style -- I mean, coolreader base already handles margins, right? As a follow-up test, as I was typing this, I changed the above p.center to just p in my book-specific style tweak and the dots stayed centered and I didn't see any change to the margins, so I'm even more inclined to believe that the text-indent should just be removed from the global paragraph style. |
![]() |
![]() |
![]() |
#9 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,750
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
delete post
Last edited by JSWolf; 02-09-2023 at 10:19 AM. |
![]() |
![]() |
![]() |
#10 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,750
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#11 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
c.f., the links in https://github.com/koreader/koreader...ent-1423005535 for the reasoning
![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Driving me nuts, lol ePub tocs | markx2 | ePub | 16 | 12-24-2013 11:26 AM |
Driving me nuts, lol | markx2 | Sigil | 1 | 12-06-2013 01:35 AM |
Kindle driving me nuts | lateralex | Devices | 4 | 02-29-2012 11:36 PM |
Ralph Ellison is driving me nuts! | loltun | Amazon Kindle | 18 | 07-10-2011 09:10 AM |
This is driving me nuts... | Spit | Calibre | 16 | 09-04-2009 02:03 AM |