I have a div container
and in container
, I have some div called child
. The size of child
depends to the text inside. But they have to be the exact same height , but the height of the biggest child
. The height of child
can't be defined.
Exemple : If the biggest child
has a height of 600px because of the text, all child
have a height to 600px.
I try something like this but min-height
is not working :/
.container {
display: flex;
margin: 10px;
padding: 4vh;
min-height: 500px;
width: 500px;
}
.child {
margin: 10px;
background-color: red;
height: 100%;
}
<div class='container'>
<div class='child'>ezjfzlkejflze</div>
<div class='child'>ezfazdzadadzadazdazdazdazfezfljrlkjfeklrgkrejhgkjerhgjerhgjrehgkjerhgkejrhgkejrgre</div>
<div class='child'>azdazdazdazjgdjzehgez</div>
<div class='child'>ezfozeklfjezfze</div>
</div>
I see something in JS, but that's not what I want. Is there a trick in CSS to do it ?