Complete the code to apply a blue background on mobile devices using Tailwind CSS.
<div class="bg-[1]-500 p-4"> Mobile first background color </div>
The class bg-blue-500 sets a blue background color. Tailwind applies this style by default on all screen sizes, starting with mobile.
Complete the code to make the text size larger on medium screens and above using Tailwind CSS.
<p class="text-base [1]:text-lg"> Responsive text size </p>
sm: which applies on smaller screens than medium.The prefix md: applies styles starting at the medium screen size (tablet and up). Here, it changes text size to large on medium screens and bigger.
Fix the error in the code to correctly apply padding only on large screens and above.
<div class="[1]:p-8"> Large screen padding </div>
md: which applies on medium screens, not large.sm: which applies on small screens.The prefix lg: applies styles starting at large screen sizes (desktop and up). This sets padding to 8 only on large screens and bigger.
Fill both blanks to create a responsive layout with a column on mobile and a row on medium screens and above.
<div class="flex [1] [2]:flex-row"> <div>Item 1</div> <div>Item 2</div> </div>
block or inline which are not flexbox directions.By default, flex-col stacks items vertically (column) on mobile. The prefix md: changes layout to flex-row on medium screens and larger, arranging items horizontally.
Fill all three blanks to create a button that is full width on mobile, half width on medium screens, and has padding 2 on mobile and padding 4 on large screens.
<button class="w-[1] [2]:w-1/2 p-2 [3]:p-4"> Responsive Button </button>
w-1/2 on mobile.The class w-full makes the button full width on mobile. The prefix md: changes width to half on medium screens. Padding p-2 applies on mobile, and lg:p-4 increases padding on large screens.