Quote:
Originally Posted by trevorburdon
Thanks Mr Wolf. I have seen Jelby's response to a similar question by you a couple of years ago!
"I'd try "max-width:100%; max-height:100%;". That should work (if the relative height works), but won't enlarge images, just reduce them if needed.
If you want to resize in any direction, I believe you have to use an SVG wrapper:"
As a straight img property does max-height:100% mean:
1. scale image to 100% of so it fit any screen heightwise, or,
2. does it mean scale the image up to 100% of its pixel height?
In the first example the image would scale to fit heightwise on a small phone screen or a large monitor screen, while in the second it would never be bigger than its original pixel dimensions in pixels.
|
Don't use both max-width and max-height. Just use max-height. Using both will just stretch the image out of shape to fill the screen.
As for the sample code I posted, you'll need to change the resolution numbers to that of your image.