Answers for "how to set image to fix in width of container"

-1

how to auto fit image in div

<img style='height: 100%; width: 100%; object-fit: contain'/>
Posted by: Guest on January-10-2022
2

css resize image to fit div no stretching

.div {
  background-image: url(../images/your-image.png);
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}
Posted by: Guest on October-06-2020

Code answers related to "how to set image to fix in width of container"

Browse Popular Code Answers by Language