+ 3
Guys please tell me what is the difference between absolute and relative position in css.
how know where i will use which position property.
2 Antworten
+ 6
in position fixed the element is stuck and remain there even if you scroll. in relative position the element is positioned according to flow of others in absolute the element is placed out of flow so you can move it left right top
+ 5
There are quite a few difference between them but one major difference is that for absolute position, if it has no position fixed to it, it uses the body and moves with the page. (Meaning that if you scroll the page, the thing will just follow you, like an annoying advertisement) But this does not apply for relative.