Check out example codes for "html position div". It will help you in understanding the concepts better.

Code Example 1

<!DOCKTYPE html> <!-- Start of coding page -->
<html> <!-- Start of html coding -->
  <head> <!-- Start of head -->
    <title>TITLE<title> <!-- Title -->
      /* CSS */
  </head> <!-- End of head -->
  <body> <!-- Start of body -->
    <div id='mydiv' style = "position:relative; left:0px; top:100px;">
      <!-- Use that style tag to positions things, have a play around with it! -->
  </body> <!-- End of body -->
<html> <!-- End of html coding -->
<!-- Add this line of code next to your id: 

style = "position:relative; left:0px; top:100px;" 

too let you position divs where you want them, you can even position
them ontop of other divs! -->

Code Example 2

<!DOCTYPE html>
<meta charset=utf-8 />
  #foo {
    position: fixed;
    bottom: 0;
    right: 0;
  <div id="foo">Hello World</div>

Code Example 3

position: static|absolute|fixed|relative|sticky|initial|inherit;

Code Example 4

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:

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

Code Example 5

  	/*left: (how much pixles from the left you want)px*/
    /*top: (how much pixles from the top you want)px*/

    /*right: (how much pixles from the right you want)px*/
    /*bottom: (how much pixles from the bottom you want)px*/

Learn ReactJs, React Native from