Lesson 14 of 3047%

(Progress persistence is disabled until Phase 9)

Tailwind CSS
Beginner

Width

Setting element width.

Use w-{size} for width.

Fixed Widths

w-16, w-32, w-64, etc.

Percentage Widths

  • w-1/2 (50%)
  • w-1/3 (33.33%)
  • w-full (100%)
<div class="w-full bg-gray-200">
  <div class="w-1/2 bg-blue-500 p-2 text-white">50% Width</div>
</div>
Try It Yourself

Lesson Progress

Take QuizBuild a Tailwind CSS Project