I have a series of div
aligned in a row with flexbox
. Their heights differ and the largest one sets a common height for all the div
. An example is given in this JSFiddle:
HTML:
<div>
<div class="big">
hello
</div>
<div>
bonjour
</div>
</div>
CSS:
div {
display: flex;
flex-direction: row;
border-color: gray;
border-style: solid;
border-width: 5px;
}
.big {
height: 100px;
}
The box with "hello" is set to 100px
and the natural height of the one with "bonjour" is much smaller. It however inherits the height of its bigger neighbour.
How can I have heights driven by the contents rather than by the maximum size of divs within a series of boxes aligned next to each others?