Это больше подходит для сетки CSS.Вы можете оставить флексбокс для центрирования.
body {
background-color: lime;
}
.container {
margin: 20px;
}
.fb {
display: flex;
justify-content: center;
}
.fb-container {
display: grid; /* Added this */
align-items: center;
grid-template-columns: 1fr 1fr; /* Added this */
/* to replace the middle border*/
grid-gap:1px;
background:#e6e6e6 padding-box;
/* */
border: solid 0.1rem #e6e6e6;
}
.fb-item {
display: flex;
align-items: center;
justify-content: center;
color: rgba(0, 0, 0, .87);
font-size: 14px;
height: 46px;
padding: 0 16px;
background-color: #fff;
}
<div class="container">
<div class="fb">
<div class="fb-container">
<div class="fb-item">
<span class="fb_label">Much loooooonger</span>
</div>
<div class="fb-item">
<span class="fb_label">Short</span>
</div>
</div>
</div>
</div>
Или хакерская идея с flexbox, которую я не рекомендую:
body {
background-color: lime;
}
.container {
margin: 20px;
}
.fb {
display: flex;
justify-content: center;
}
.fb-container {
display: flex;
flex-direction:column; /* This will make them both equal */
transform:translateX(-50%); /* Hack */
}
.fb-item {
display: flex;
align-items: center;
justify-content: center;
color: rgba(0, 0, 0, .87);
font-size: 14px;
height: 46px;
padding: 0 16px;
background:#fff;
border: solid 0.1rem rgba(0,0,0,.12);
}
.fb-item:not(:first-child) {
border-left: none;
transform:translateY(-100%) translateX(100%); /* Hack */
}
<div class="container">
<div class="fb">
<div class="fb-container">
<div class="fb-item">
<span class="fb_label">Much loooooooonger</span>
</div>
<div class="fb-item">
<span class="fb_label">Short</span>
</div>
</div>
</div>
</div>