I am struggling to align the titles of three icons in a row with varying subtitle lengths. I need this alignment to work seamlessly on both mobile and desktop devices. https://i.sstatic.net/fBZRB.png
Below is the code I have so far, but I have not been able to successfully align them. Any help using flexbox would be greatly appreciated:
#join3icons {
display: flex;
flex-direction: row;
justify-content: center;
gap: var(--size-125);
padding: 0 var(--size-125);
}
.icon-box {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 4px;
}
<div id="join3icons">
<div class="icon-box">
<a href="."><img src="Easier.svg"></a>
<span class="headline3">Einfacher</span>
<span class="sub3iconsText">Auftragsverfolgung</span>
</div>
<div class="icon-box">
<a href="."><img src="Faster.svg"></a>
<span class="headline3">Schneller</span>
<span class="sub3iconsText ">Checkout-Vorgang</span>
</div>
<div class="icon-box">
<a href="."><img src="Earn.svg"></a>
<span class="headline3">Besser</span>
<span class="sub3iconsText ">Lorem Ipsum is simply dummy text</span>
</div>
</div>