Skip to content

How to set image size without changing aspect ratio in CSS?

img {
  display: block;
  max-width:230px;
  max-height:95px;
  width: auto;
  height: auto;
}
See also  CSS code snippet - How to center an overlay button using flex box?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.