Answers for "calculate width for image based on height and aspect ratio css"

CSS
0

keep aspect ratio of image css

img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}
Posted by: Guest on April-29-2020

Code answers related to "calculate width for image based on height and aspect ratio css"

Browse Popular Code Answers by Language