Grow a flex item X times as big as other flex items

We can define how individual flex item can grow and shrink relative to other flex items.

Code Structure for center flex items
.flexcontainer {
 display: flex;
 flex-direction: row;
}
.big {
 flex: 2 0 0;
}
.small {
 flex: 1 0 0;
}

Example

Share this

Related Posts