title: sticky navigation bar dysfunctional
body: <p>I'm relatively new to web development and I have been assigned a practise "job" from one of my family members. I'm having trouble with the "sticky" function. It's a navbar with a dropdown. When I try to scroll down to test the sticky function, it won't work. </p>
  
  <p>Here is my code sample:</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>.nav {
    position: sticky;
  }
  
  ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: #333;
    display: inline-block;
    min-width: 3990px;
  }
  
  li {
    float: left;
  }
  
  li a,
  .dropbtn {
    display: inline-block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
  }
  
  li a:hover,
  .dropdown:hover .dropbtn {
    background-color: red;
  }
  
  li.dropdown {
    display: inline-block;
  }
  
  .dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
  }
  
  .dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
  }
  
  .dropdown-content a:hover {
    background-color: #f1f1f1;
  }
  
  .dropdown:hover .dropdown-content {
    display: block;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
    &lt;div class="nav" id="navbar"&gt;
      &lt;ul&gt;
        &lt;li&gt;
          &lt;a href="First_Page.html"&gt;Home&lt;/a&gt;
        &lt;/li&gt;
        &lt;li&gt;
          &lt;a href=""&gt;About Us&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="dropdown" id="navbar"&gt;
          &lt;a href="#" class="dropbtn"&gt;Dropdown&lt;/a&gt;
          &lt;div class="dropdown-content" id="navbar"&gt;
            &lt;a href="#"&gt;Link 1&lt;/a&gt;
            &lt;a href="#"&gt;Link 2&lt;/a&gt;
            &lt;a href="#"&gt;Link 3&lt;/a&gt;
          &lt;/div&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>it's a "prototype" so please don't judge it too harshly.</p>
  
  <p>have a nice day.</p>