Check out example codes for "margin x css". It will help you in understanding the concepts better.

Code Example 1

/* Apply to all four sides */
margin: 1em;
margin: -3px;

/* vertical | horizontal */
margin: 5% auto;

/* top | horizontal | bottom */
margin: 1em auto 2em; 

/* top | right | bottom | left */
margin: 2px 1em 0 auto;

/* Global values */
margin: inherit;
margin: initial;
margin: unset;

Code Example 2

p {
  margin: 35px;
}

Code Example 3

p {
  margin: 25px 50px 75px 100px;
  /*in order:
  top right bottom left */
}

Learn ReactJs, React Native from akashmittal.com