11. Flexbox: arranging items in a row
ستتم ترجمة هذا المقال تلقائيًا. يُعرض بالإنجليزية حاليًا.
Set display: flex on a container and its children line up in a row. justify-content spreads them along the row, and align-items moves them up or down. gap sets the space between items.
Flexbox is the simplest modern tool for menus, toolbars and card rows.
عرض المثال
.row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
}
✍️ دورك الآن
Make .row a flex container with justify-content center and a gap of 10px.