title: Sticky navbar not fixed after scrolling
body: <p>I followed a tutorial about sticky navbar with pure css without javascript. The problem is that the sticky navigation bar is not fixed at the top of the page when i scroll down. Under this sticky navbar I have 3 other sections. Every time I scroll down the page that the navbar goes under sections and does not work anymore. In the header I have a full-width image and I have some text and a button on it.</p>
  
  <p>Here is my code of navbar in HTML:</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 {
    margin: auto;
    position: relative;
    width: 100%;
    height: 100vh;
    background: linear-gradient(black, transparent, black), url(images/architecture2.jpg);
    background-size: cover;
    background-position: center;
    display: table;
    top: 0;
  }
  
  nav {
    position: absolute;
    width: 100%;
    height: 50px;
    background: rgba(0, 0, 0, .1);
    position: sticky;
    top: 0;
  }
  
  nav ul {
    display: flex;
    margin: 0;
    padding: 0 100px;
    float: right;
  }
  
  nav ul li {
    list-style: none;
  }
  
  nav ul li a {
    display: block;
    color: #fff;
    padding: 0 15px;
    text-decoration: none;
    text-transform: capitalize;
    font-weight: bold;
    line-height: 90px;
  }
  
  .intro .inner {
    margin-top: 200px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    color: #fff;
  }
  
  .content h1 {
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    font-size: 3.5rem;
  }
  
  .content p {
    padding: 0;
    margin-top: -35px;
    margin-left: -1px;
    color: #fff;
    font-size: 2.2rem;
    padding-bottom: 35px;
  }
  
  .btnD1 {
    border: 2px solid #fff;
    color: #000;
    background: #fff;
    border-radius: 50px;
    padding: 16.5px 50px;
    font-size: 1.15rem;
    font-weight: 500;
    text-decoration: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  
  &lt;head&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div class="wrapper"&gt;
      &lt;header&gt;
        &lt;nav&gt;
          &lt;div class="menu"&gt;
            &lt;ul&gt;
              &lt;li&gt;&lt;a href="#"&gt;Acasa&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#despre"&gt;Despre Noi&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#calatorii"&gt;Calatorii&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#contact"&gt;Contact&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;SignIn&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/div&gt;
        &lt;/nav&gt;
  
        &lt;div class="intro"&gt;
          &lt;div class="inner"&gt;
            &lt;div class="content"&gt;
              &lt;h1&gt;C&amp;#259l&amp;#259tore&amp;#351te cu noi &amp;#238n jurul lumii&lt;/h1&gt;
              &lt;p&gt;Destina&amp;#355ia visat&amp;#259 este la un click distan&amp;#355&amp;#259!&lt;/p&gt;
              &lt;a class="btnD1" href="#"&gt;Rezerv&amp;#259 acum&lt;/a&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/header&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Sorry for my bad english.</p>
  
  <p>Thanks!</p>