Quote:
Originally Posted by Detroa
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.