I try to center an img inside a flexbox and make it resizable. When I apply centering with align-self: center or margin: auto, it keeps the same size for all resolutions. When I remove centering, it resizes perfectly (but then it's not centered :v).
Any ideas what I did wrong?
EDIT: I solved it with {width:100%; max-width:800px/for me/}
//SASS
.hero {
display: flex;
flex-direction: column;
img {
max-width: 792px;
align-self: center;
}
}
//React
<section className="hero">
<img src={collage} />
<h1>Online Experiences</h1>
<p>
Join unique interactive activities led by one-of-a-kind hosts—all
without leaving home.
</p>
</section>