0
0
Tailwindmarkup~10 mins

Max-width responsive variants in Tailwind - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to apply a max-width of 4xl on medium screens and above.

Tailwind
<div class="max-w-[1] md:max-w-4xl">Content</div>
Drag options to blanks, or click blank then click option'
Axl
B3xl
C2xl
Dlg
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same max-width for base and medium screens, so no visible change.
Using an invalid size like '5xl' which is not in options.
2fill in blank
medium

Complete the code to apply a max-width of 2xl on small screens and 5xl on large screens.

Tailwind
<section class="max-w-[1] lg:max-w-5xl">Content</section>
Drag options to blanks, or click blank then click option'
Axl
B3xl
C2xl
D4xl
Attempts:
3 left
💡 Hint
Common Mistakes
Using a larger base max-width than the large screen max-width.
Confusing the breakpoint prefix like using md instead of lg.
3fill in blank
hard

Fix the error in the code to correctly apply max-width 3xl on medium screens.

Tailwind
<div class="max-w-xl md:max-w-[1]">Content</div>
Drag options to blanks, or click blank then click option'
A4xl
Bxl
C2xl
D3xl
Attempts:
3 left
💡 Hint
Common Mistakes
Using a smaller size like 2xl which does not meet the requirement.
Using a size without the md prefix.
4fill in blank
hard

Fill both blanks to create a responsive container with max-width 2xl on base and 6xl on extra-large screens.

Tailwind
<div class="max-w-[1] xl:max-w-[2]">Content</div>
Drag options to blanks, or click blank then click option'
A2xl
B4xl
C6xl
D3xl
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the breakpoint prefixes.
Using sizes that do not exist in Tailwind's max-width scale.
5fill in blank
hard

Fill all three blanks to create a responsive card with max-width xl on base, 3xl on medium, and 7xl on 2xl screens.

Tailwind
<article class="max-w-[1] md:max-w-[2] 2xl:max-w-[3]">Card content</article>
Drag options to blanks, or click blank then click option'
Axl
B3xl
C7xl
D5xl
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong breakpoint prefix like lg instead of 2xl.
Setting sizes in wrong order causing smaller max-width on larger screens.