FAQ: CSS Display and Positioning - Position: Relative

#21

Lovely - clear now - many thx for the input!

#22

Very much feels like there is an opportunity to explain that in the lesson; I too was left wondering the same thing as @sahilgoyal01996 (or that as in the style of other lessons, this question itself could be linked to in the lesson).

But you explain it very well here. Thanks.


And in other words:

All the question divs were in fact moved down 40px from their starting positions; as per their class declarations.

So it appears counter-intuitive at first, but the important point appears to be that the position offset is relative to the element’s default position on the page; and not relative to any other element.

1 Like