Flex recipes: Make items equal width
2 May 2023 (Updated 2 May 2023)
For each item, ensure:
0: This will ensure all items occupy the same initial space (0 px) to start with. If you don’t set this, the default
autovalue will give elements the initial width of their contents. So even if the remaining free space in the flex container is distributed evenly, items can have different widths based on their content.
1: This will ensure any remaining free space in the flex container is distributed evenly between the flex items.