CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS position Property

CSS position Property

 

 

The position property is used to specify the type of positioning method used for an element. There are the following types of positioning methods:-

  1. static
  2. relative
  3. absolute
  4. fixed
  5. sticky

 

Default Value:-

 

Its default value is static.

 

Syntax:-

 

Its syntax is:- position: static | absolute | fixed | relative | sticky | initial | inherit;

 

Further Explanation:-

 

Value Description
static Elements render in order in the document flow.
absolute The element is positioned relative to its first positioned ancestor element.
fixed The element is positioned relative to the browser window.
relative The element is positioned relative to its normal position.
sticky The element is positioned based on the user scroll position.
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Properties

All Sections related to CSS