Complete the code to make the container responsive using Tailwind CSS.
<div class="[1] mx-auto p-4"> <p class="text-center">Welcome to my responsive site!</p> </div>
The container class in Tailwind CSS creates a responsive fixed width container that adjusts at different screen sizes.
Complete the code to apply padding that changes on medium screens using Tailwind CSS.
<div class="p-2 [1]:p-6"> <p>Content with responsive padding.</p> </div>
The prefix md: applies styles starting at the medium breakpoint, making padding larger on medium and bigger screens.
Fix the error in the Tailwind class to make the text center on small screens and larger.
<p class="[1]:text-center text-left">Responsive text alignment</p>
The sm: prefix applies styles starting at small screens, so text will be centered on small and larger screens.
Fill both blanks to create a responsive grid with 1 column on small screens and 3 columns on large screens.
<div class="grid grid-cols-[1] [2]:grid-cols-3 gap-4"> <div class="bg-blue-200 p-4">Box 1</div> <div class="bg-blue-400 p-4">Box 2</div> <div class="bg-blue-600 p-4">Box 3</div> </div>
Setting grid-cols-1 creates one column by default. The lg: prefix changes the grid to 3 columns on large screens.
Fill all three blanks to create a responsive button with blue background, white text, and padding that increases on medium screens.
<button class="bg-[1]-500 text-[2] p-2 [3]:p-4 rounded"> Click me </button>
The button uses a blue background (bg-blue-500), white text (text-white), and padding that increases on medium screens (md:p-4).