April 17, 2018 at 10:30 am #269918
Can you set an image to fill 100% of a container’s width except when the container’s width exceeds the image’s natural width?
I find the distortion of the enlarged image more noticeble than the shrunken image.April 17, 2018 at 10:53 am #269920
You should be able to do this by applying
max-width:100%;to the img element.April 18, 2018 at 8:22 am #269963
You can do that just to set the width of the image 100% and it will follow the container.
You must be logged in to reply to this topic.