Which position value removes an element from normal flow and places it relative to its nearest positioned ancestor?
A
absolute
Correct answer
B
sticky
C
relative
D
static
Correct answer
A. absolute
13 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
position: absolute takes the element out of the flow and positions it relative to the nearest ancestor with a position other than static. relative offsets the element but keeps its space.
Reference
Asked in: NTS, Web Developer Interviews
Doubts & discussionNot sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ
‹ Previous MCQ With box-sizing: content-box, an element has width 200px, padding 20px and a 5px border on each side. What is its total rendered width? Next MCQ › Which CSS property controls the stacking order of overlapping positioned elements?