Using Flexbox can really enhance the design capabilities of a web designer. However, figuring out exactly how to achieve certain layouts can sometimes be tricky. For instance, consider this plunk. I want the items to expand within each row without stretching across the entire width in the last row.
In my CSS, I have included the following key code:
.recipe-picker recipe {
-webkit-flex: 0 1 8em;
flex: 0 1 8em;
height: 12em;
}
If I modify the 0
to a positive number (representing the flex-grow
property), the last row of items distorts in an unattractive manner. While the other item rows act appropriately, the final row should maintain the same size as the others.
How can I resolve this issue and achieve the desired layout?