Check out example codes for "how to vertically align text css". It will help you in understanding the concepts better.

Code Example 1

<!DOCTYPE html>
    <title>Title of the document</title>
    <style type="text/css">
      div {
        display: table-cell;
        width: 250px;
        height: 200px;
        vertical-align: middle;
    <div>Vertically aligned text</div>

Code Example 2

.center {
  padding: 70px 0;
  border: 3px solid 
  text-align: center;


Code Example 3

.parent {
  position: relative;
.child {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

Learn ReactJs, React Native from