View Single Post
Old 01-22-2021, 03:51 PM   #29
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 318
Karma: 3200000
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
My advice would be to get away from InDesign for this, and also to not set a height value at all. You should also avoid using fixed units like pixels. Instead I would set your landscape photos at width: 100%.

Portrait, I’m less sure. Perhaps start at something like 70% for those, and experiment from there.

Code:
<div class="landscape">
<img src="image.jpg" alt="a wide image"/>
</div>

<div class="portrait">
<img src="image2.jpg" alt="a tall image"/>
</div>
Code:
.landscape img {
	width: 100%;
}

.portrait img {
	width: 70%;
	margin-left: 15%; 
}

Last edited by phillipgessert; 01-22-2021 at 03:59 PM.
phillipgessert is offline   Reply With Quote