title: Centering elements vertically in a fixed-height container
body: <p>I have a website that needs a pixel based navbar - in this case <code>height: 80px</code>.</p>
  
  <p>The problem is, I can't center the <code>ul</code> and <code>li</code> elements vertically. </p>
  
  <p>I've tried using: <code>top:50%; transform: translate(0,-50%)</code>, as shown in my jsfiddle, and also flex positioning, but none have worked.</p>
  
  <p>Jsfiddle: <a href="https://jsfiddle.net/agreyfield91/w3s8cj92/" rel="nofollow noreferrer">https://jsfiddle.net/agreyfield91/w3s8cj92/</a></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>header {
    height: 80px;
    position: fixed;
    top: 0;
    transition: top 0.2s ease-in-out;
    width: 100%;
  }
  
  footer {
    background: #ddd;
  }
  
  * {
    color: transparent
  }
  
  nav {
    height: 100%;
    width: 100%;
    background-color: bisque;
  }
  
  nav ul {
    list-style: none;
    text-align: center;
    margin: 0;
    padding: 0;
    top: 50%;
    transform: translate(0, -50%);
  }
  
  nav ul li {
    display: inline-block;
    float: left;
  }
  
  nav ul li a {
    display: block;
    padding: 15px;
    text-decoration: none;
    color: #aaa;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 10px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;header class="nav-down"&gt;
    &lt;nav class="headernav"&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href="#"&gt;Gig&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#"&gt;ity&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#"&gt;element&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/nav&gt;
  &lt;/header&gt;</code></pre>
  </div>
  </div>
  </p>