property
flex-grow — CSS reference
Controls the share of spare main-axis space added to the base size. Initial 0; not inherited. A factor of 2 does not imply twice the final width; starting sizes and constraints still matter. Fractional factors can leave space unused.
Formal Syntax & Structure
css syntaxcss
<number [0,∞]>Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS flexible sizing lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}#p{display:flex;width:300px;align-items:flex-start;background:#e6eef2} #p>*{box-sizing:content-box;min-width:0;height:30px;background:#128579;color:white} #b{background:#326c9d}#a{flex:1 1 60px}#b{flex:2 1 60px}</style><body><div id="p"><div id="a">A</div><div id="b">B</div></div></body></html>