+ 2

Positioning

I really don’t grt what does position does can someone explain the difference between position: relative and postion:absolute

23rd Apr 2019, 3:30 PM
Bassanio V. Saba Jr.
Bassanio V. Saba Jr. - avatar
3 Answers
+ 6
Well... Basically "position: absolute" is related with the screen's position, and "position:relative" is related with the element's father position. At first, they seem to do the same thing, but there's a great difference between them. For example... An element with "position: absolute" will always be in the same position, regardless his father's position. However with an element with "position: relative", its position will change if its father's position change.
23rd Apr 2019, 8:23 PM
Daniel Yuki
Daniel Yuki - avatar
+ 1
Daniel Yuki Nice Explanation
7th May 2020, 12:52 PM
THE CRAZY ONE ✌️
THE CRAZY ONE ✌️ - avatar
+ 1
To add on , the father's position refers to the elements on the page ie the page itself such that position:absolute will produce an effect of us moving the parent position(the page) but have our position element remain on it's position even if other elements hover above it😅
20th Nov 2020, 5:02 PM
Tendai Muzuva
Tendai Muzuva - avatar