View Single Post
Old 01-25-2021, 03:03 AM   #49
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,561
Karma: 20150435
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by knightrider247 View Post
I didnt mean to put height and width to 100 % of one picture but 100 % width of the landscape pic and 100 % height for the portrait pic.
Even that wouldn't work. What if a portrait picture is wider than the screen is? What if a landscape picture is higher than the screen is?

What you want, conceptually at least, is "max-height: 100vh; max-width: 100vw", or in SVG terms: width="100%" height="100%" preserveAspectRatio="xMidYMid meet"
Jellby is offline   Reply With Quote