Activate Flexbox

<div class="container">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
</div>
.container {
    display: flex;
}

Untitled

Flexbox Axis

Flex Direction: Changing the Flow

.container {
    display: flex;
    flex-direction: column;
}

Untitled

Justify Content: Controlling the Main Axis

.container {
    display: flex;
    justify-content: flex-start;
}

Untitled

Align Items: Controlling the Cross Axis

.container {
    display: flex;
    align-items: stretch;
}

Untitled

The Gap Property

.container {
    display: flex;
    gap: 30px;
}

Untitled

Flex Wrap: Avoiding the Crush