Tsallaka zuwa abun ciki
Justice Tech School

Flexbox Layout

Flexbox lays items in a row or column. display: flex on the parent, then justify-content and align-items position the children.

Example
<style>.row { display: flex; gap: 8px; justify-content: space-between } .row div { background: #0f766e; padding: 10px }</style>
<div class="row"><div>One</div><div>Two</div><div>Three</div></div>

Exercise

Make a flex container.

display: ;

Quiz Test

Which property spaces items along the main axis?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.