Which CSS property controls the stacking order of overlapping positioned elements?
A
order
B
float
C
position
D
z-index
Correct answer
Correct answer
D. z-index
17 views
⚔️
Challenge a friend on Cascading Style Sheets - CSS
Same MCQs, timed, live leaderboard. Send the link on WhatsApp – no sign-up needed.
Create challenge
Explanation
A higher z-index places an element above others in the same stacking context. It only works on positioned elements (not static) and on flex or grid items.
Reference
Asked in: NTS, Web Developer Interviews
Doubts & discussionNot sure why the answer is D? Ask here and get an explanation.
Ask a doubt about this MCQ
‹ Previous MCQ Which position value removes an element from normal flow and places it relative to its nearest positioned ancestor? Next MCQ › In Flexbox, which property aligns items along the main axis?