CSS position Property | CSS Position Tutorial

In this chapter, we are going to learn about CSS Position property.
Position Property used to position the element.
The position property has five values
  1. Static
  2. Relative
  3. Absolute
  4. Fixed
  5. Sticky 
The HTML elements are positioned Top, Bottom, Left, Right without position property, this property will not work.

Static - is a default value of elements, these elements would not be affected by top, right, bottom left values.

Relative - These elements positioned normal and these elements are affected by top, right, bottom,left

Absolute - These elements positioned to the parent relative elements, this element is affected by top, right, bottom, left

Fixed - These elements positioned to the viewport

Sticky - The position of This element based on the user scroll

Comments