Skip to main content

How do you activate Flexbox for a container?

Set on the element:

css
container { display: flex; }

After this, it becomes a flex container, and its direct children - flex items, to which flex properties (flex-direction, justify-content, align-items, etc.) start to apply.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.

How do you activate Flexbox for a container?: CSS Interview Question