0

Position in Css

Hi. I've read a lot about positionning in Css but I cant seem to make a difference between position absolute and relative. Can u explain it well enough? Thank you in advance

1st Apr 2019, 7:57 PM
jeSuisCodeuse
2 Answers
2nd Apr 2019, 9:58 PM
Mitali
Mitali - avatar
+ 1
//An element with position: absolute; is positioned relative to the nearest positioned ancestor (instead of positioned relative to the viewport, like fixed). However; if an absolute positioned element has no positioned ancestors, it uses the document body, and moves along with page scrolling.
1st Apr 2019, 8:27 PM
Sudarshan Rai
Sudarshan Rai - avatar