Positions is used to place the elements on the web page and decide the behavior of the element when we resize or scroll the page.
1) Static Position
It is the default position of the element in the web page. It positioned normally on the web flow and the content will scroll up and we scroll the page
2) Relative Postion
We can move the element from top,bottom,right, left from the original position of the element (Relative position)
3) Absolute Position
We can place the element on any position of web page by giving them top bottom left right but it will take his position from its main parent like the body
If we make top 0 then the element goes to the Top of the body as 0 position. We can also change then by giving the relative positions to the parent of that element
4) Fixed Position
This position is used to stuck the element on the page that it will not scroll by the scrolling of the page. As a result it will be fixed in his position and scrolling doesn’t effect his position
In short css position gives us control and flexibility to manage our design layout and the pattern of the website which is better for the user interface and easy to manage