DEV Community


Discussion on: CSS Position Property Explained!

afif profile image
Temani Afif

If there is no ancestral element with a non static position set, it will base its position on body --> it's not really the body but the initial containing block as defined here: it's upper than the body (and the html) element.

Example: (see how the element is at the bottom of the screen and not the bottom of the body or the html).

indoor_keith profile image
Keith Charles

ah yup, so it can go all the way up to document if body or html isn't positioned as well. 👍