CSS position relative

CSS
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Test</title>
<style>
  #foo {
    position: fixed;
    bottom: 0;
    right: 0;
  }
</style>
</head>
<body>
  <div id="foo">Hello World</div>
</body>
</html>position: static|absolute|fixed|relative|sticky|initial|inherit;h2{
 	position: absolute;
 	left: 100px;
	top: 150px;
}
 h2.pos_left {
  position: relative;
  left: -20px;
}

h2.pos_right {
  position: relative;
  left: 20px;
}The position property specifies the type of positioning method used for an element (static, relative, fixed, absolute or sticky).

The position Property:
----------------------------
The position property specifies the type of positioning method used for an element.
There are five different position values:
  1. static
  2. relative
  3. fixed
  4. absolute
  5. 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.

position: relative;
-----------------------
An element with position: relative; is positioned relative to its normal position.
Setting the top, right, bottom, and left properties of a relatively-positioned element will cause it to be adjusted away from its normal position. Other content will not be adjusted to fit into any gap left by the element.

Suppose a <div> element has position: relative;
Here is the CSS that is used:

Example:
div.relative {
  position: relative;
  left: 30px;
  border: 3px solid #73AD21;
}
Source

Also in CSS: