title: How to center a burger icon vertically inside a div?
body: <p>I have a navigation menu that contains a burger icon made with 3 <code>&lt;span&gt;</code> that is inside another elements :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.navbar {
    width: 100%;
    color: #fff;
    background-color: #df0024;
    padding: 1% 0;
  }
  
  .tog {
    display: flex;
    cursor: pointer;
    float: right;
    width: 6%;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
    height: auto;
  }
  
  
  /*This is the div that contain the burger 3 layers*/
  
  #nav-icon {
    height: -webkit-fill-available;
    height: -moz-fill-available;
    height: -o-fill-available;
    height: fill-available;
    position: relative;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: .5s ease-in-out;
    -moz-transition: .5s ease-in-out;
    -o-transition: .5s ease-in-out;
    transition: .5s ease-in-out;
    cursor: pointer;
  }
  
  /*/The style of each of the burger icon 3 layers*/
  #nav-icon span {
    display: block;
    position: absolute;
    height: 3.1vh;
    width: 100%;
    background: white;
    border-radius: 9px;
    opacity: 1;
    left: 0;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: .25s ease-in-out;
    -moz-transition: .25s ease-in-out;
    -o-transition: .25s ease-in-out;
    transition: .25s ease-in-out;
  }
  
  #nav-icon span:nth-child(1) {
    top: 0px;
  }
  
  #nav-icon span:nth-child(2) {
    top: 12px;
  }
  
  #nav-icon span:nth-child(3) {
    top: 24px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;nav class="navbar"&gt;
    &lt;div class="logo"&gt;
      &lt;a href="#"&gt;&lt;img src="" alt='Logo' /&gt;&lt;/a&gt;
    &lt;/div&gt;
    &lt;div id='tog' class="tog"&gt;
      &lt;label for="toggle" id='nav-icon'&gt;
          &lt;div class='icon-container'&gt;
           &lt;span&gt;&lt;/span&gt;
           &lt;span&gt;&lt;/span&gt;
           &lt;span&gt;&lt;/span&gt; 
          &lt;/div&gt;          
             &lt;/label&gt;
    &lt;/div&gt;
  &lt;/nav&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How to center the <code>#nav-icon span</code> inside the <code>#nav-icon</code> vertically ? All I want is centering the burger icon so I don't care of changing the other elements style that contain the burger icon. </p>