![]() |
#61 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,855
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
-webkit-column-break-inside: avoid !important; break-inside: avoid !important; page-break-inside: avoid !important; |
|
![]() |
![]() |
![]() |
#62 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,175
Karma: 148951761
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#63 | |
Connoisseur
![]() Posts: 73
Karma: 10
Join Date: May 2025
Device: iPad
|
Quote:
Code:
-webkit-column-break-inside Code:
-webkit-page-break-inside |
|
![]() |
![]() |
![]() |
#64 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,855
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
First at all, because "-webkit-page-break-inside" doesn't exist and second, because ereaders based on Readium/Webkit to display the epub as unique pages, split (internally) in columns the full xhtml file that is showing.
|
![]() |
![]() |
![]() |
#65 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,855
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
The images fit on the page but in some ereaders (for example Foliate for linux) without "-webkit-column-break-inside: avoid" images can be showed half in page and half in the following one, they are not forced to float vertically. All this on epub3 of course.
|
![]() |
![]() |
![]() |
#66 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,175
Karma: 148951761
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I've never heard of any program that splits an image. If the image is too larger for the page, it can get moved to the next page or you won't see some of the image as it's off the page for the bit that don't fit.
|
![]() |
![]() |
![]() |
#67 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,855
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
EDIT: Here you have the issue with Foliate (in this case with a full page image) and the right way to be displayed with Readium: a) The issue with Foliate: b) Perfectly showed with Readium: In both cases the fragmentation is avoided (no blank space) but in Foliate the image was splitted. However I was able to fix that also in Foliate: ![]() Last edited by RbnJrg; 06-05-2025 at 04:07 PM. |
|
![]() |
![]() |
![]() |
#68 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,509
Karma: 108666825
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
|
![]() |
![]() |
![]() |
#69 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,855
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() https://www.mobileread.com/forums/sh...6&postcount=16 https://www.mobileread.com/forums/sh...0&postcount=17 Of course, all of this is done under epub3 together with appropriate code to avoid fragmentation. Last edited by RbnJrg; 06-08-2025 at 11:43 AM. |
|
![]() |
![]() |
![]() |
#70 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Sep 2025
Device: none
|
Hello! I've been lurking a lot here for a while now and decided it's time to ask for advice.
In the company I work at I sometimes prepare e-books for clients. I don't have much experience so I've always been doing epubs as simple as can be. But I always struggle with images. Now I'm working on a book (ePub3) with lots of images with captions. Images are both vertical and horizontal, all of them have captions, both short and long. I included them in <figure> tags following guidlines found on this forum and while horizontal images display more or less properly, vertical ones just don't work. So I think I'll attempt RbnJrg's method with svg wrapper. I have three questions though: 1. Is there any chance this will work on Kindle after converting to mobi with kindle previewer? The client wants to get both ePub and mobi formats. 2. Is there a proper, working way to include alternative text for image in svg wrapper? The client wants e-book to be accessible. 3. Can I leave horizontal images in <figure> tags and put only problematic vertical ones in svg? Or should I do everything one way? Any help would be greatly appeciated! |
![]() |
![]() |
![]() |
#71 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,509
Karma: 108666825
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
For reflowable ebooks
Mobi is basically dead. You can only really know what Amazon is doing by uploading the epub and publishing, then buying it on 2 kinds of Kindle and an app. If all are on same account it's one purchase. The default is KFX with the more similar to epub older azw3/KF8 as a fallback on older Kindles. The epub3 can work and be accessible, but epub2 is also accessible and works on more ereaders and apps. Many epub3 features are not supported by Amazon. The Amazon "Kindle Previewer" isn't doing the same conversion as Amazon does on epub uploads. It's only a rough guide and its output can't be published on Amazon. I've abandoned it. The "Send to Kindle" email or web page and download via WiFi to Kindle and app might be more accurate than the Previewer, but isn't the same as the Publishing conversion Amazon does (I don't know why). They deliver KFX for any ereader since PW1 and all apps and azw3/KF8 format for K3 to PW1. Since they abolished Download and Transfer mostly the K1, K2 and DX family can't get downloads. Only they and DXG are limited to mobi (KF7). To fully test you need to publish, buy and unpublish after sync with four things: Kindle App on Android Kindle App on iOS Any Kindle newer than a Paperwhite 1 (Gen5?) for KFX. Any Kindle from K3 (gen3 keyboard ) or later up to Paperwhite 1, with the last FW (some of the older Kindles didn't have azw3/KF8 originally). Note that are are several fixed layout Kindle formats (at least one is an encapuslated PDF). The app file ending doesn't indicate format. Older PC or Kindle downloads in onld mobi AKA KF7 can have .mobi or .azw (no 3) endings. I put images each in their own <p> with nothing else, unless they are very small and several same height on one line (then they are in the same tag) or unless they are full screen. Last edited by Quoth; Yesterday at 09:24 AM. |
![]() |
![]() |
![]() |
#72 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,509
Karma: 108666825
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Maybe RbnJrg has a list of epub3 features that work on azw3/KF8 & KFX via actual Amazon publishing* from an epub3 upload.
[* Not the Previewer or slightly better STK, but a bought Kindle ebook on the 4 viable platforms of iOS, Android, newer Kindles and older Kindles with working WiFi] Last edited by Quoth; Yesterday at 09:30 AM. |
![]() |
![]() |
![]() |
#73 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,855
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
Quote:
1. In your xhtml file: Code:
<figure class="container"> <div class="imageRow"> <img src="../Images/Img1.jpg" alt="Imagen de ejemplo"/> </div> <figcaption class="textRow"> <p>This is an example of text. You can change the font size to see how the image adapts. The goal is for the image to fill all available vertical space, leaving only enough space for the text. Additionally, the main container takes up 100% of the viewport's height.<br/><br/>This additional text is to test how the growth of text content affects the image space. As this text grows larger (simulating a font increase), the image should reduce its height to accommodate it.</p> </figcaption> </figure> Code:
.container { display: flex; flex-direction: column; height: 100vh; width: 100%; margin: 0; } .imageRow { display: flex; flex: 1 1 auto; justify-content: center; align-items: center; background-color: #00ff00; /* you can delete this, is for debugging purpose */ min-height: 0; } .imageRow img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; } .textRow { flex: 0 0 auto; padding: 20px; background-color: #e0e0e0; /* you can delete this, is for debugging purpose */ } .textRow p { margin: 0; font-size: 1em; text-align: center; line-height: 1.2; } As you can see, the caption remains with the image no matter the font-size. When you increase the size of the text, then the size of the image decreases and that way everything stays together. |
|||
![]() |
![]() |
![]() |
#74 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 47,324
Karma: 171313058
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Attributes and Tags Supported by Enhanced Typesetting HTML and CSS Tags Supported in Kindle Format 8 From my experience, even CSS listed as supported often has issues when comparing the output to the same CSS on a ePub renderer. |
|
![]() |
![]() |
![]() |
#75 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,855
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
I agree. For example, KFX supports, in theory, <figure> and display: flex and float: left. Well, with the proper combination of the tag and properties, it is possible to avoid fragmentation (blank spaces originated by images, tables, etc.) under epub3. But under KFX one can't have the same output.
|
![]() |
![]() |
![]() |
Tags |
alignment, img, width |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Image Alignment Issues | AndrewCanada | Editor | 2 | 10-06-2019 11:47 AM |
Text - Image alignment problem | MrB | Sigil | 10 | 11-03-2012 03:36 AM |
Hello/Image and text alignment | Derek R | Introduce Yourself | 3 | 06-26-2011 10:47 AM |
Image alignment and spacing | Derek R | Kindle Formats | 5 | 06-25-2011 12:57 PM |