Grandma Marni, Mrs. Yanti and Mr. Sugeng share one real flex table: type each cloth’s flex, and Mr. Karim’s tape shows the basis, the part grow added or…
grow/shrink/basis is the part of flexbox that most often sends people back to a hard-coded width. Once the order is clear (bases first, then share the surplus or shortage, then the min-content floor), sidebars, equal tabs and overflowing long text become predictable.
Bases first, then the surplus (or shortage) is shared
flex-grow is in pixels It is a ratio for sharing the leftover space. grow 2 against 1 = 2/3 against 1/3 of what is LEFT after the bases. For an exact final width ratio, use a basis of 0 (flex: 2, flex: 1).min-width: auto holds it at its min-content width (the longest word or URL). Set min-width: 0 (or overflow: hidden) on that item, plus overflow-wrap: anywhere or an ellipsis for its text.flex: 1 and flex: auto used interchangeably flex: 1 = 1 1 0%: ignore the content, share equally. flex: auto = 1 1 auto: respect the content size first, then share the rest. Equal tabs need the first.flex: 1 on all three cloths The signs differ in length, the widths are identical: a basis of 0 means the whole table is shared equally.flex: 1 and flex: auto Look at the basis column in the table: 0% against auto (= its sign’s width).min-width: 0 to a cloth stuck at its floor Try it in the web address banner situation: Mrs. Yanti’s cloth can finally get narrower than its sign.