Quote:
Originally Posted by knightrider247
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"