![]() |
#16 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,663
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Under epub3, no problem: The above screenshots show full page images (and no blank spaces generated by them) but is possible to do the same with any size of image. The problem is under epub2; you can't avoid blank spaces on ereaders based on RMSDK and the size is an issue (because you have to define a height and that is a problem with RMSDK). |
|
![]() |
![]() |
![]() |
#17 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,663
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Since you Jellby speak spanish, here you have an example with images at half size (of course, all under epub3):
As you can see, there is no fragmentation (no blank space) and the caption remains with the image in both, portrait and landscape mode (the caption is live text). With epub2 and ereaders based on ADE, is not possible to get that. Last edited by RbnJrg; 05-02-2025 at 09:06 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#18 | |
Member
![]() Posts: 24
Karma: 10
Join Date: Apr 2025
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#19 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,663
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
SVG wrappers can be also used for half size images and they don't necessarily have to be 100% screen height (in fact, in my examples I used SVG wrappers); maybe you don't know yet how to use them in the best way and for that reason you prefer to employ the <img> tag. SVG wrappers are a powerful tool that solve problems that can hardly be fixed through the <img>. But since we didn't see any examples of the images you're using or your epub layout, it's not possible to say whether it's better to use <img> or <svg> in your case. Could you post and example (a screenshot will work) of the images are you using and the text surrounding them? Of that way would be easier to us to help you better.
Last edited by RbnJrg; 05-02-2025 at 10:10 AM. |
![]() |
![]() |
![]() |
#20 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,329
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
![]() I never thought about that… but it’s so obvious now that you mentioned it… super easy to change, just set the height of the div… Code:
<head>
<title></title>
<style type="text/css">
* {margin:0; padding:0}
div {width:100vw; height:30vh}
</style>
</head>
|
|
![]() |
![]() |
Advert | |
|
![]() |
#21 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,663
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() Quote:
![]() EDIT: I use the method of setting the div height (to me, is the best and safest), but you also have the alternative to set the height of the svg wrapper and not setting the div height, for example: Code:
<div>
<svg xmlns="http://www.w3.org/2000/svg" height="20vh" preserveAspectRatio="xMidYMin meet" version="1.1" viewBox="0 0 xxx xxx" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
...
</svg>
</div>
Last edited by RbnJrg; 05-02-2025 at 12:35 PM. |
||
![]() |
![]() |
![]() |
#22 | |
Member
![]() Posts: 24
Karma: 10
Join Date: Apr 2025
Device: none
|
Quote:
These are the sample images that we are using for testing. All images are PNG files and include shapes, letters, and numbers. To make things easier, all images will have the same width: exactly 1240 pixels. The height will be different for each image but always less than 900 pixels. Please note that these PNG images have been optimized using TinyPNG (https://tinypng.com). The epub layout is simple. The text is above the image and below the image. There is no text on the left or right side of any image. The images do not have captions. I heard that things like vw, vh, and SVG wrapping are mostly used by Apple. Other platforms like KDP, Kobo, and Nook don’t support them very well. |
|
![]() |
![]() |
![]() |
#23 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,663
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Ok, but, where is the first text? Is it at the start of the page? Or it can be at the middle of the page? Or the text can be almost at the end of the page? As you can understand, if the first line of text is at the top of the page, things are easier to code.
|
![]() |
![]() |
![]() |
#24 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,329
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
You always need to check that your target devices support the coding you use. I'm pretty sure someone will jump on here and say to NEVER use anything but CSS2 because their old device, based on old standards, doesn't support the new capabilities. That concern is partly true. You should always test on the devices in your target market. However, there are methods of coding that will use the new CSS on devices that support it, and 'fall back' to the older CSS if it doesn't support it. vw and vh are part of the current CSS that is seeing more and more support....it's OK to use them as long as you provide fallback. eg. {width:100%; width:100vw} I am not aware of a device that doesn't support SVG wrappers unless it is really old (like maybe mobipocket). It's up to you if you want to lose the .02 cents and not serve that market to make all the rest of the books look nice. I'm pretty sure the Kobo will support the new CSS if it is loaded as a kepub...if you try and load it as an epub it uses a really old rendering engine that doesn't support much of anything... In general, the newer devices that are being actively maintained by the manufacturer will support the new CSS... </philosophy> As always...it's up to you to decide what you want to do. Cheers! |
|
![]() |
![]() |
![]() |
#25 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,310
Karma: 168808723
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Perhaps using figure and figcaption might be useful since the books are intended to be EPUB3.
|
![]() |
![]() |
![]() |
#26 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,663
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
We need to know the layout of the epub. The OP says that is simple: a line of text, the image, and another line of text. If these three elements are at the start of the chapter, anything will work; the problem arises if all three elements can be anywhere. The OP also doesn't say whether the three elements should remain together but I suspect so. Finally, if the book's design allows all three elements to float (that is, they don't have to be in a specific position), then using the <figure> tag makes sense. However, the OP still needs to consider the fallback code for epub2.
|
![]() |
![]() |
![]() |
#27 | |
Member
![]() Posts: 24
Karma: 10
Join Date: Apr 2025
Device: none
|
Quote:
They are making some changes, so the internet is not working well these days. Chapter layout example Definition 1: one line text text text text text (from 1 to 13 lines of text on 4-inch width page with Arial-12) text text text text text text text text text text text text Definition 2: one line text text text text text (from 1 to 13 lines of text on 4-inch width page with Arial-12) text text text text text text text text text text text text page break on same html file Definition 3: one line text one imgae with width=1240 pixels text text text text (from 1 to 13 lines of text on 4-inch width page with Arial-12) text text text text text text text text text text text text Definition 4: one line text text text text text (from 1 to 13 lines of text on 4-inch width page with Arial-12) text text text text text text text text text text text text Definition 5: one line text text text text text (from 1 to 13 lines of text on 4-inch width page with Arial-12) text text text text text text text text text text text text Definition 6: one line text text text text text (from 1 to 13 lines of text on 4-inch width page with Arial-12) text text text text text text text text text text text text page break on same html file Definition 7: one line text one imgae with width=1240 pixels text text text text (from 1 to 13 lines of text on 4-inch width page with Arial-12) text text text text text text text text text text text text Definition 8: one line text text text text text (from 1 to 13 lines of text on 4-inch width page with Arial-12) text text text text text text text text text text text text Definition 9: one line text text text text text (from 1 to 13 lines of text on 4-inch width page with Arial-12) text text text text text text text text text text text text ........................ Please note that there is a page break on same html file before every definition that contains an image. Last edited by robertmchicago; 05-03-2025 at 03:59 AM. |
|
![]() |
![]() |
![]() |
#28 | |
Member
![]() Posts: 24
Karma: 10
Join Date: Apr 2025
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#29 |
Member
![]() Posts: 24
Karma: 10
Join Date: Apr 2025
Device: none
|
|
![]() |
![]() |
![]() |
#30 | |
Member
![]() Posts: 24
Karma: 10
Join Date: Apr 2025
Device: none
|
Quote:
Thanks a lot Images match their definition. They should be placed with their definition. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word -> EPUB Chapter titles blank for Headings using Word's {TC...} codes | GranitStateColin | Conversion | 2 | 12-21-2021 09:29 PM |
images in epub | alberto_savoini | Tolino | 1 | 01-10-2020 12:33 AM |
Images exporting to epub | carlsbad | Workshop | 5 | 09-13-2014 02:10 AM |
Epub creation - pasting word and preserving codes | Mr Pointy | ePub | 24 | 03-21-2014 02:55 PM |
ePub with Images | prdufresne | Calibre | 10 | 12-04-2010 01:55 AM |