I have div
with display: flex
and within this div
there is an image with dimension of 670x227 (natural)
, because it is inside a div
with flexbox
it is "resized" horizontally to fill the entire space, so it "distorts" by getting 732x227
, I tried to use flex-shrink
and width
to keep it with the original aspect ratio and so far I have not been successful.
The CSS:
.media-objects {
display: flex;
flex-direciton: column;
}
.media-objects .image {
width: 100%;
flex: 0 1 auto;
flex-shrink: 0;
}
I'm using the css framework bulma