keep aspect ratio of image css
img {
display: block;
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
keep aspect ratio of image css
img {
display: block;
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
html image keep aspect ratio
Don't set height AND width. Use one or the other and the correct aspect ratio will be maintained.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us