Grandma Marni’s compartment table is a real grid: set the tracks, place-items, place-content and place-self on the egg crate, and the browser measures what…
Alignment is CSS confusion source number one: justify or align, items or content, why justify-items does nothing in flex. Once you see the two layers move differently (inside a cell vs the cells themselves) and the rule justify = inline axis, align = block axis, you learn the system once.
*-items arranges inside the cells, *-content arranges the cells
*-items when the whole grid is what should move items = the item inside its cell (the cell stays). content = the cells inside the container, and it needs leftover space: fixed or auto tracks, not 1fr.justify-items does nothing at all in flexbox Flexbox ignores justify-items and justify-self. Use justify-content on the container, or margin-left: auto on one item.justify- = the inline axis (→ in left-to-right text), align- = the block axis (↓). In the shorthand place-items: A B, A is align and B is justify.justify-items: end The goods move to the right of their compartments while the compartments stay. Piksel says: compartments 0px, goods so many pixels.justify-content: center Now the compartments move: the whole rack shifts into the middle of the leftover room.repeat(3, 1fr) for the columns, then click another justify-content Leftover → becomes 0px and nothing moves. 1fr uses up the room there was to share.display to flex, then click justify-items 0px. Flex has no cell per item, so justify-items is ignored. In flex, justify-content does the job.