Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to apply a z-index of 10 using Tailwind CSS.
Tailwind
<div class="relative [1]">Content</div>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
z-20 which sets z-index to 20, not 10.Using
z-auto which resets z-index to default.✗ Incorrect
The class z-10 sets the z-index to 10, controlling stacking order.
2fill in blank
mediumComplete the code to set the z-index to the highest predefined Tailwind value.
Tailwind
<div class="absolute [1]">Top Layer</div>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing
z-40 or lower which are not the highest.Using
z-auto which does not set a numeric z-index.✗ Incorrect
z-50 is the highest default z-index value in Tailwind CSS.
3fill in blank
hardFix the error in the code to correctly apply a z-index of 5 using Tailwind CSS.
Tailwind
<div class="relative [1]">Layer</div>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
z-5 which is not a valid Tailwind class.Using
z-auto which resets z-index.✗ Incorrect
Tailwind does not have a z-5 class by default. Use z-10 for a low z-index.
4fill in blank
hardFill both blanks to set a fixed position and a z-index of 40.
Tailwind
<div class="[1] [2]">Fixed Layer</div>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
absolute instead of fixed for position.Using
z-10 which is lower than 40.✗ Incorrect
fixed sets the position fixed, and z-40 sets the z-index to 40.
5fill in blank
hardFill all three blanks to create a sticky header with z-index 30 and relative positioning.
Tailwind
<header class="[1] [2] [3]">Header Content</header>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
fixed instead of sticky.Omitting the z-index class or using a wrong value.
✗ Incorrect
sticky makes the header stick on scroll, z-30 sets the stacking order, and relative sets positioning context.