freeCodeCamp/guide/english/css/layout/the-position-property/index.md

1.1 KiB

title
The Position Property

The Position Property

The position property specifies the type of positioning method used for an element (static, relative, fixed, absolute or sticky). The position property specifies the type of positioning method used for an element. The position proprty isn't generally used to create layouts, but instead it is used to position elements that somehow stand out from the page flow.

There are five different position values:

  • static
  • relative
  • fixed
  • absolute
  • sticky Elements are then positioned using the top, bottom, left, and right properties. However, these properties will not work unless the position property is set first. They also work differently depending on the position value.

More Information:

The is a good article to read up to understand more about the position property.