Flexbox
Use flex utilities to arrange elements horizontally and vertically.
Learning approach
Study the Tailwind classes in the example, run the preview, then modify the classes and observe how the design changes.
Tailwind Example
HTML + Tailwind CSS
<div class="flex items-center justify-between p-5 bg-slate-900 text-white rounded-xl">
<span class="font-bold">
Vinsoft Lab
</span>
<button class="px-4 py-2 bg-indigo-600 rounded-lg">
Login
</button>
</div>
Live Preview
Your Tailwind design will appear here.
Click Run Preview
See the lesson example here.
Test your understanding
Choose the best answer.
Which Tailwind utility creates a flex container?