Let's have a look at following CSS positioning:
- CSS Static Positioning
- CSS Fixed Positioning
- CSS Relative Positioning
- CSS Absolute Positioning
CSS Static Positioning
This is a by default position for HTML elements. It always positions an element according to the normal flow of the page. It is not affected by the top, bottom, left and right properties.
CSS Fixed Positioning
The fixed positioning property helps to put the text fixed on the browser. This fixed test is positioned relative to the browser window, and doesn't move even you scroll the window.
CSS Relative Positioning
The relative positioning property is used to set the element relative to its normal position.
CSS Absolute Positioning
The absolute positioning is used to position an element relative to the first parent element that has a position other than static. If no such element is found, the containing block is HTML.
With the absolute positioning, you can place an element anywhere on a page.