Adjust height of an image to content
Problem: make the image fit the height of the container, regardless of size and ratio. The height of the container is also dynamic.
https://codepen.io/ArekJanik/pen/zYxQZZR
Solution: position the image absolutely and limit its size to the static width of the container and dynamic height.
Tweet