Flex Grow

by ced1

HTML

<div class="flex">
    <div class="flex-i">Little</div>
    <div class="flex-i">Just Normal</div>
    <div class="flex-i">A loooooong looooooong string.</div>
</div>

<div class="flex">
    <div class="flex-i">Just Normal</div>
    <div class="flex-i">Just Normal</div>
    <div class="flex-i">Just Normal</div>
</div>

CSS

.flex {    
    display: -webkit-flex;
    display: flex;
}
.flex-i {
    color: white;
    background-color: blue;
    padding: 20px;
    -webkit-flex-grow: 2;
    flex-grow: 1;
    border: 5px solid red;
    text-align: center;
}
.flex-i:first-child {
    border-right: 0;
    flex-grow: 3;
}
.flex-i:last-child {
    border-left: 0;
flex-grow: 3;
}