View Single Post
Old 08-14-2020, 03:41 PM   #9
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: 79,796
Karma: 146391129
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 Detroa View Post
Thank you so much to both of you for this explanation and that link.

Keeping in mind what phillipgessert said I fiddled with some of the code found in hobnail's link and the following paramaters seem to work!

Code:
<div>
	<img src="image.jpg" />
</div>

.div
{
	width: 100%;
	max-height: 100%;
	page-break-inside: avoid;
	break-inside: avoid;
}
.img
{
	max-width: 100%;
	max-height: 100%;
}
Your code is not the best way to do it. The issue is with the div.

Code:
div {
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}
You do not need any sort of page break. Also, max-height does not always work. But where it doesn't work, it doesn't seem to cause any problems. max-width does work in more cases. That's why the code I posted works in more cases.
JSWolf is offline   Reply With Quote