sajad torkamani

For each item, ensure:

  • flex-basis is 0: This will ensure all items occupy the same initial space (0 px) to start with. If you don’t set this, the default auto value 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.
  • flex-grow is 1: This will ensure any remaining free space in the flex container is distributed evenly between the flex items.
Tagged: CSS