09-13-2023, 03:23 PM | #1 |
Enthusiast
Posts: 39
Karma: 10
Join Date: Aug 2014
Device: none
|
in viewer, text "sliding" off the left margin
Attachment 203744In at least one of my books (I've seen it before, in other books, and ignored it, but right now can't find any other book where it is happening) the farther I read into the book the farther the first letter of every line is sliding off the left margin, by which I mean progressively more and more of the left side of each first letter is cut off, as if the text were being pushed off the page. see attached image.
Thanks in advance, for any help you can give! Fredex |
09-13-2023, 03:46 PM | #2 |
Well trained by Cats
Posts: 29,973
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I suspect bad code (CSS) has negative margins that are accumulating.
The first C in CSS is Cascade |
09-13-2023, 06:16 PM | #3 |
Enthusiast
Posts: 39
Karma: 10
Join Date: Aug 2014
Device: none
|
in viewer, text "sliding" off the left margin
I suspect you're right, but having inspected the CSS (and I'm no expert therein) I can't see it. there ARE negative margins, but ASFAICS they are being reset appropriately.
But I'll go stare at it some more,... miracles DO happen! |
09-13-2023, 06:31 PM | #4 | |
Well trained by Cats
Posts: 29,973
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
This tool shows how things are layered in the Box Model (also in the Editor) |
|
09-13-2023, 07:32 PM | #5 |
Enthusiast
Posts: 39
Karma: 10
Join Date: Aug 2014
Device: none
|
OK, so I tweaked the CSS a bit, based on guesswork:
Code:
.calibre_28 { display: block; /* text-indent: -19pt; margin: 1em 0 0 19pt; */ text-indent: 0; margin 1em 0 0 0; } .calibre_29 { display: block; /* text-indent: -19pt; margin: 0 0 0 19pt;*/ text-indent: 0; margin: 0 0 0 0; } Thanks for your replies! Fred |
09-13-2023, 09:37 PM | #6 |
Well trained by Cats
Posts: 29,973
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
That is a hanging indent.
The code looked normal (calibre28 is a common first Paragraph style with a large top margin) I don't see why that would cause issues. |
09-14-2023, 03:18 PM | #7 |
Enthusiast
Posts: 39
Karma: 10
Join Date: Aug 2014
Device: none
|
while I don't know which of those classes does what, it didn't appear obviously wrong, but I didn't see any negative offsets anywhere else, so I gave it a try and voila!
Do you know if any of the CSS (or other features) involved in Calibre ebooks are documented anywhere? Thanks! Fred |
09-14-2023, 03:49 PM | #8 |
Well trained by Cats
Posts: 29,973
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Calibre does EPUB (see MR Wiki)
The viewer is more tolerant of errors than most EPUB devices A negative indent was just a guess. There are so many other things that (self) publishers do trying to trick normal behavior into being JUST LIKE THE PRINT VERSION I looked at those 2 samples, and just figured that was what would normally be done if you wanted a Hanging indent |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bug converting html css text-indent and left-margin | bhoyt | Conversion | 15 | 01-24-2014 07:28 PM |
Get rid off "left-justified" text | SMR | Kindle Developer's Corner | 3 | 03-01-2012 01:14 AM |
epub "padding left" to mobi "block quote" conversion issue | 1611mac | Conversion | 3 | 01-11-2012 02:10 PM |
Foxit's "text viewer" -> save? | ile | Amazon Kindle | 2 | 10-10-2010 06:29 PM |