Check out example codes for "css vertical-align not working". It will help you in understanding the concepts better.

Code Example 1

<div class="outer">
   <div class="inner"/>
</div>

.outer {
  display : flex;
  align-items : center;
  justify-content: center;
}

Learn ReactJs, React Native from akashmittal.com