I use flex boxes
html
<div class="sorts__descr">
<p>bla bla</p>
<div class="coffee">
<img src="./img/sorts/rob.png" alt="coffee">
</div>
</div>
sass
&__descr
display: flex
justify-content: space-between
align-items: start
img
position: relative
margin: 0 40px
max-width: 530px
border-radius: 20px
p
font-size: 18px
line-height: 135%
The output is: enter image description here
I tried using different methods such as:
width: 100%;
height: auto;
or
max-width: 100%;
height: auto;
or
width: 100%;
max-width: 400px;
height: auto;
When I specify max-width: 100% for an image, the result is: enter image description here
I want it to be like this when the screen is zoomed out: enter image description here