What is the preferred method for restricting the size of an image and why?
While max-width
can be used to restrict the size of an element, this article recommends using it specifically for images within containers.
If you have a web application with a vertical content flow, is there a specific reason you should avoid using max-height
to limit the size of an image?
Read more about recommended techniques here