I have a bunch of links that has the appearance of larger boxes, and the content and height often varies. Using flexbox to give them equal height on each row is easy.
I use the Bootstrap grid layout, and when each box is stacked vertically (one on each row) on a smaller screen size, then I can't get flexbox to set the same height on them.
I hoped I could solve the problem by changing flow-direction
to column
from row
, but no.
Is there any way to solve this without using javascript hack?
Relevant parent container css:
display: flex;
flex-direction: row;
flex-flow: row wrap;
Child link (flex)boxes:
display: flex;
Pseudo code:
<div class="flex-container>
<a href="/#" class="box col-lg-3 col-md-4 col-sm-6">
<h2>Test2</h2>
<div><img src="/ds" alt="Hi" /></div>
<div>sadsafmf sløfmkls</div>
</a>
<a href="/#" class="box col-lg-3 col-md-4 col-sm-6">
<h2>Test3</h2>
<div><img src="/ds" alt="Hi" /></div>
<div>sadsafmf sløfmkls skldfsd ffsf sdflsdf f sl as ad sad</div>
</a>
</div>