Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 07-25-2024, 04:53 PM   #16
Quoth
Reading till the spring
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 12,518
Karma: 94058919
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by JSWolf View Post
On a Kindle, you can use negative margins to be able to use more of the screen.
For personal use, not distribution.
Quoth is offline   Reply With Quote
Old 07-28-2024, 07:04 AM   #17
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 571
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by Quoth View Post
You can't fill the screen width on a Kindle as there is a fixed minimum margin.
Correctly done epub css will fill the width on most epub systems at width: 100%; height: auto; if the image isn't too tall.
This is on a Kobo, and the image is only about 200px in height.
Phssthpok is offline   Reply With Quote
Old 07-28-2024, 11:51 AM   #18
Quoth
Reading till the spring
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 12,518
Karma: 94058919
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by Phssthpok View Post
This is on a Kobo, and the image is only about 200px in height.
Then the CSS or enclosing HTML/CSS is wrong. Make sure height: auto; when width:; <any>%; and that no other CSS/HTML is overriding that. I don't have ANY other enclosing html for <img than a <p class="draw-centre"> that sets zero left and right margins, zero left & right padding and text-align: center; The top & bottom margins as desired. I only have non-zero padding-top for any entity at the start of a file (as margin-top will then be ignored on many renderers).

No margin: auto; anywhere.

Last edited by Quoth; 07-28-2024 at 12:00 PM.
Quoth is offline   Reply With Quote
Old 07-28-2024, 03:10 PM   #19
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,945
Karma: 138256890
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Quoth View Post
Then the CSS or enclosing HTML/CSS is wrong. Make sure height: auto; when width:; <any>%; and that no other CSS/HTML is overriding that. I don't have ANY other enclosing html for <img than a <p class="draw-centre"> that sets zero left and right margins, zero left & right padding and text-align: center; The top & bottom margins as desired. I only have non-zero padding-top for any entity at the start of a file (as margin-top will then be ignored on many renderers).

No margin: auto; anywhere.
Does auto need to be used? I don't use auto and I don't have a problem with images.
JSWolf is online now   Reply With Quote
Old 07-28-2024, 03:14 PM   #20
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,945
Karma: 138256890
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Phssthpok View Post
This is on a Kobo, and the image is only about 200px in height.
Depending on the aspect of the image, I would make the height to 100%. For example, the cover.

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.
JSWolf is online now   Reply With Quote
Old 07-28-2024, 04:44 PM   #21
Quoth
Reading till the spring
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 12,518
Karma: 94058919
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by JSWolf View Post
Depending on the aspect of the image, I would make the height to 100%. For example, the cover.

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.
The cover is about the ONLY thing were you set both 100% and only if you you don't care about aspect ratio.

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.
Quoth is offline   Reply With Quote
Old 07-28-2024, 05:16 PM   #22
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,945
Karma: 138256890
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Quoth View Post
The cover is about the ONLY thing were you set both 100% and only if you you don't care about aspect ratio.

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.
You should never use width and height both at 100% for the cover. Only use height of 100%. You would easily screw up the correct aspect ration.

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.
JSWolf is online now   Reply With Quote
Reply

Tags
css, image aspect ratio, kobo libra 2


Forum Jump

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


All times are GMT -4. The time now is 05:23 AM.


MobileRead.com is a privately owned, operated and funded community.