← Quiz: Flexbox and Grid: all 10 questions
Quiz: Flexbox and Grid · Question 9 of 10
A badge uses position: absolute; top: 0; right: 0;. It should sit in the corner of its card. What must the card have?
A badge uses position: absolute; top: 0; right: 0;. It should sit in the corner of its card. What must the card have?
- A.display: none
- B.A position value such as relative
- C.position: static
- D.A fixed height
Answer & explanation
Correct answer: A position value such as relative
An absolute element is placed relative to its nearest positioned ancestor.
Can you get the rest right without peeking?
Take the timed Quiz: Flexbox and Grid quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →