Check out example codes for "css align items vertical center". 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

	display: block;
	margin-left: auto;
	margin-right: auto;
	width: 40%;

Code Example 3

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

Learn ReactJs, React Native from