07-25-2024, 04:53 PM | #16 |
Reading till the spring
Posts: 12,552
Karma: 94058919
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
|
07-28-2024, 07:04 AM | #17 |
Age improves with wine.
Posts: 571
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
|
This is on a Kobo, and the image is only about 200px in height.
|
Advert | |
|
07-28-2024, 11:51 AM | #18 | |
Reading till the spring
Posts: 12,552
Karma: 94058919
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
No margin: auto; anywhere. Last edited by Quoth; 07-28-2024 at 12:00 PM. |
|
07-28-2024, 03:10 PM | #19 | |
Resident Curmudgeon
Posts: 77,000
Karma: 138588794
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
07-28-2024, 03:14 PM | #20 | |
Resident Curmudgeon
Posts: 77,000
Karma: 138588794
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
I set img so it doesn't go off the screen. I don't use auto and I don't need it. It's just unneeded code. Code:
img { max-height: 100%; max-width: 100%; } .height { text-align: center; text-indent: 0; height: 100%; } .width { text-align: center; text-indent: 0; width: 100%; } Last edited by JSWolf; 07-28-2024 at 03:20 PM. |
|
Advert | |
|
07-28-2024, 04:44 PM | #21 | |
Reading till the spring
Posts: 12,552
Karma: 94058919
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
If it's a square to landscape shape image (and likely portrait images not taller aspect than screen aspect) the height is auto if setting width and this maintains aspect ratio. It's not extra or unneeded code. A cover is a special case. |
|
07-28-2024, 05:16 PM | #22 | |
Resident Curmudgeon
Posts: 77,000
Karma: 138588794
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
In your 2nd example, the height is automatically auto if it's not specified. So setting height to auto is excess code that's not needed. For example, when I do the code for the cover and the titlepage image, I do not set width to auto and I've never had a problem. If the image is going to be too small even if the width is 100% such as a map, I rotate it so I can then set the height to 100%. Given it's on my Libra 2, I can just rotate my L2 to see the image right side up. I know that should not be done for a book for sale, but for your own use, it's perfectly acceptable. Last edited by JSWolf; 07-28-2024 at 05:19 PM. |
|
Tags |
css, image aspect ratio, kobo libra 2 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura H2O Font size mismatch (downloaded epubs via Calibre vs. Kobo epubs & articles) | Oolong | Kobo Reader | 36 | 01-25-2019 07:00 AM |
kepubify - A standalone tool to convert ePubs into Kobo ePubs | geek1011 | Kobo Reader | 114 | 03-04-2018 11:30 AM |
question about images in epubs | juliana000 | Kobo Reader | 6 | 09-27-2013 10:11 PM |
Help finding tiny towers and tiny zoo | mojkadona | Kindle Fire | 5 | 04-26-2012 08:02 PM |
Touch Problem with all epubs, my epubs, or my kobo? (line clipping) | plague006 | Kobo Reader | 14 | 12-03-2011 12:32 AM |