0
0
Tailwindmarkup~20 mins

Top, right, bottom, left offsets in Tailwind - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Offset Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Tailwind's top offset utility
Which Tailwind CSS class correctly moves an element 2rem down from the top edge of its nearest positioned ancestor?
Abottom-8
Btop-2
Ctop-8
Dmt-8
Attempts:
2 left
💡 Hint
Remember, Tailwind's spacing scale uses multiples of 0.25rem, so 8 means 2rem.
📝 Syntax
intermediate
2:00remaining
Correct Tailwind class for right offset
Which Tailwind CSS class applies a 1rem offset from the right edge of a positioned element?
Amr-4
Bright-4
Cright-1
Dpr-4
Attempts:
2 left
💡 Hint
Check Tailwind's spacing scale and remember that right-4 sets right: 1rem;.
rendering
advanced
2:00remaining
Visual effect of bottom-0 class
What will you see if you apply the class bottom-0 to a position: absolute element inside a container?
AThe element sticks to the bottom edge of the container with no space.
BThe element moves 0.25rem above the bottom edge.
CThe element moves 1rem above the bottom edge.
DThe element stays in its original position.
Attempts:
2 left
💡 Hint
The bottom-0 class sets bottom: 0;.
selector
advanced
2:00remaining
Choosing the correct Tailwind class for left offset
You want to move an absolutely positioned element 3rem away from the left edge. Which Tailwind class should you use?
Aleft-3
Bml-12
Cpl-12
Dleft-12
Attempts:
2 left
💡 Hint
Tailwind spacing scale: 12 means 3rem (12 * 0.25rem).
accessibility
expert
3:00remaining
Accessibility impact of using offsets for focus outlines
If you use Tailwind's top-4 and left-4 classes to offset a custom focus outline element away from a button, what accessibility issue might arise?
AThe focus outline may not align with the button, confusing keyboard users.
BScreen readers will not announce the button's label correctly.
CThe button will lose its click functionality.
DThe button's color contrast will automatically fail.
Attempts:
2 left
💡 Hint
Think about how keyboard users rely on visible focus outlines.