Lesson 18 of 3060%

(Progress persistence is disabled until Phase 9)

Tailwind CSS
Beginner

Flexbox

Introduction to Flexbox in Tailwind.

Applying the flex class turns an element into a flex container.

<div class="flex bg-gray-100 p-4">
  <div class="bg-blue-200 p-4">Child 1</div>
  <div class="bg-blue-300 p-4">Child 2</div>
</div>

By default, flex items are laid out horizontally.

Try It Yourself

Lesson Progress

Ready to practise?

Apply what you learned with a hands-on challenge.

Practise This Topic