One
Add more text to this box to make it grow
Three
has
extra
text
Four
Five
Six
Seven
Eight
Nine
Ten
.box { display: flex; flex-wrap: wrap; } .box>* { flex: 1 1 auto; } .hide { visibility: collapse; }
<div class="box"> <div>One</div> <div>Add more text to this box to make it grow</div> <div class="hide">Three <br>has <br>extra <br>text </div> <div>Four</div> <div>Five</div> <div>Six</div> <div>Seven</div> <div>Eight</div> <div>Nine</div> <div>Ten</div> </div>