Gabriel de Souza Gabriel de Souza - 6 months ago 11
CSS Question

Css Html div resize to fit, but not resize the image

Hi I am trying to make a resizable div (gallery of photos to my site) to fit but not deform the background image enter image description here

To work in multiple screens, I found a perfect example https://popcorntime-online.io/

How can I make this?

Answer

You can use flexbox for this

.movies_wrapper {
  display: 'flex'; flex-direction: 'row'; align-items: 'stretch';
}

https://jsfiddle.net/x0vLgfar/