So I've been doing some research regarding aspect ratios and I am not understanding it very well.
I need an aspect ratio of 5x4
and I know that there is a css prop named object-fit
.
So I applied that to my image component.
.image {
object-fit: cover;
height: 200px;
width: 100%
}
And that works good across screen resolutions.
But my question is; how do I achieve the 5x4 ratio? Like, what will be the height
that I need to set to my component?