Interview Question

What is flexbox?

Flexbox lays out items primarily along one axis.

💡 Concept ✅ Quick Revision 🎨 CSS

Answer

Flexbox is a one-dimensional layout model for arranging items along a main axis. • A flex container is created with `display: flex` or `inline-flex`. • Items can grow, shrink, align, wrap, and distribute free space. • Visual reordering should not replace a logical document order.

💡 Simple Example

.toolbar { display: flex; align-items: center; gap: 1rem; }

⚡ Quick Revision

Flexbox lays out items primarily along one axis.