For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/css/properties/flex-grow.md.
Lynx
  • English
  • flex-grow

    Introduction

    The flex-grow CSS property sets the flex grow factor, which specifies how much of the flex container's remaining space should be assigned to the flex item's main size.

    When the flex-container's main size is larger than the combined main sizes of the flex items, the extra space is distributed among the flex items, with each item growth being their growth factor value as a proportion of the sum total of all the container's items' flex grow factors.

    The main size is either width or height of the item which is dependent on the flex-direction value.

    flex-grow is used alongside the other flex properties flex-shrink and flex-basis, and normally defined using the flex shorthand to ensure all values are set.

    Examples

    Syntax

    /* <number> values */
    flex-grow: 3;
    flex-grow: 0.6;

    Values

    • <number>

      Negative values are invalid, Defaults to 0

    Formal definition

    Initial value0
    Applies toflex items
    Inheritedno
    Animatableyes

    Formal syntax

    flex-grow =
      <number [0,∞]>

    Compatibility

    LCD tables only load in the browser

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.