Answer the question
In order to leave comments, you need to log in
How to make child img's dynamic width equal to the parent block with flex?
Good afternoon!
The problem is in the title of the question.
The .b-block property is set to display: flex. When changing the width of the screen, it is necessary that the child img inside always be equal to the width of the parent - .b-block
Can this be done using css?
Link to Codepen
Answer the question
In order to leave comments, you need to log in
.b-main .b-block__item {
list-style: none;
width: 100%;
flex-shrink: 0;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question