Flex Basis

Define the default size of an element before the remaining space is distributed.

The flexBasis property specifies the initial main size of a flex item. This property determines the size of the content-box unless otherwise specified with box-sizing.

Example

Loading Preview…

Quick Notes

  • flexBasis influences auto sizing.
  • It is similar to width (or height depending on flexDirection) but specific to flex items.

Next Steps

© 2026 ByteLand Technology Limited