I have a flex box div containing (black border) several child divs (green, blue, red). The height of the children is defined by the their content. Normally the height of the parent is the height of the biggest child. In my use case I need to be able to skip some children (green) for the parents height calculation and cut those children's height overflow. In contrast to the example I don't want to set fixed values for height.
.a {
display: flex;
border: 1px solid black;
}
.a2 {
display: flex;
max-height: 250px;
border: 1px solid black;
}
.b {
height: 300px;
width: 50px;
border: 1px solid green;
background-color: green;
}
.c {
height: 200px;
width: 50px;
border: 1px solid blue;
background-color: blue;
}
.d {
height: 250px;
width: 50px;
border: 1px solid red;
background-color: red;
}
is situation:
<div class="a">
<div class="b">
</div>
<div class="c">
</div>
<div class="d">
</div>
</div>
target situation:
<div class="a2">
<div class="b">
</div>
<div class="c">
</div>
<div class="d">
</div>
</div>
