07-25-2024, 03:53 PM | #16 |
the rook, bossing Never.
Posts: 12,286
Karma: 89822819
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
|
07-28-2024, 06: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.
|
07-28-2024, 10:51 AM | #18 | |
the rook, bossing Never.
Posts: 12,286
Karma: 89822819
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
No margin: auto; anywhere. Last edited by Quoth; 07-28-2024 at 11:00 AM. |
|
07-28-2024, 02:10 PM | #19 | |
Resident Curmudgeon
Posts: 76,122
Karma: 134368292
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, 02:14 PM | #20 | |
Resident Curmudgeon
Posts: 76,122
Karma: 134368292
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 02:20 PM. |
|
07-28-2024, 03:44 PM | #21 | |
the rook, bossing Never.
Posts: 12,286
Karma: 89822819
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
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, 04:16 PM | #22 | |
Resident Curmudgeon
Posts: 76,122
Karma: 134368292
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 04: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 06:00 AM |
kepubify - A standalone tool to convert ePubs into Kobo ePubs | geek1011 | Kobo Reader | 114 | 03-04-2018 10:30 AM |
question about images in epubs | juliana000 | Kobo Reader | 6 | 09-27-2013 09:11 PM |
Help finding tiny towers and tiny zoo | mojkadona | Kindle Fire | 5 | 04-26-2012 07:02 PM |
Touch Problem with all epubs, my epubs, or my kobo? (line clipping) | plague006 | Kobo Reader | 14 | 12-02-2011 11:32 PM |