Answer the question
In order to leave comments, you need to log in
How is the height of flex items calculated?
Hello.
There is such an example https://jsfiddle.net/vLw6jh5x/
In the first case, all flex items take the height of the parent due to the align-items: stretch property;
In the second case, the height: 100% property is applied to them. It would seem that the result should be identical to the first one, but instead the height equals the content. Why is this happening?
Answer the question
In order to leave comments, you need to log in
the height: 100% property only works for nested elements with a parent of a given height, otherwise it just doesn't work. Actually, for this, in particular, they use flex.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question