title: Why position sticky is not working on my nav?
body: <p>I have tried to add position sticky to my nav class &quot;header__div-nav&quot; but it does not seem to work. I have tried adding, display initial to the parent as other posts suggested, but with no results.</p>
  <p>Right now this is behaving as static instead of sticky.</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>body {
    font-family: "New Tegomin", serif;
    background-color: #ddd;
    margin-bottom: 5vh;
  }
  
  figcaption {
    display: none;
  }
  
  .header__div-nav {
    box-shadow: 0 4px 2px -2px gray;
    background-color: white;
    position: sticky;
    top: 0; /* required */
    width: 100%;
    z-index: 999;
  }
  .navbar__ul {
    margin: 0;
    padding: 0;
    height: 20vh;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }
  
  .navbar__ul * {
    padding: 0 2vw;
    list-style-type: none;
    display: block;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;title&gt;Mac Miller&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;header id="header"&gt;
        &lt;div class="header__div-nav"&gt;
          &lt;nav id="navbar"&gt;
            &lt;ul class="navbar__ul"&gt;
              &lt;li&gt;&lt;a href="#tribute-info"&gt;About&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#albums"&gt;Albums&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#pics"&gt;Cool Pics&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/nav&gt;
        &lt;/div&gt;
      &lt;/header&gt;
      &lt;main id="main"&gt;
        &lt;div class="main__title_container"&gt;
          &lt;h1 id="title"&gt;Mac Miller&lt;/h1&gt;
        &lt;/div&gt;
          &lt;h2&gt;About&lt;/h2&gt;
          &lt;p&gt;
            Malcolm James McCormick (January 19, 1992 – September 7, 2018), known
            professionally as Mac Miller, was an American rapper, singer,
            songwriter, and record producer from Pittsburgh, Pennsylvania.
          &lt;/p&gt;
      &lt;/main&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>