title: HTML/CSS dropdown next to button
body: <p>So i have a vertical navbar with dropdowns but everytime i do a dropdown its drops straight down from where it started.
  I would like the dropdown menu to appear to the right of the bar.
  In the code snippet you wil see what code i'm using now (from w3schools).</p>
  
  <p>I also included an image to beter show what i mean.</p>
  
  <p><a href="https://i.stack.imgur.com/1erMc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1erMc.png" alt="Quite a bad drawing but gets the job done"></a></p>
  
  
  
  <pre class="lang-css prettyprint-override"><code>.dropbtn {
      background-color: #4CAF50;
      color: white;
      padding: 16px;
      font-size: 16px;
      border: none;
      cursor: pointer;
  }
  
  .dropdown {
      position: relative;
      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);
  }
  
  .dropdown-content a {
      color: black;
      padding: 12px 16px;
      text-decoration: none;
      display: block;
  }
  
  .dropdown-content a:hover {background-color: #f1f1f1}
  
  .dropdown:hover .dropdown-content {
      display: block;
  }
  
  .dropdown:hover .dropbtn {
      background-color: #3e8e41;
  }
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;h2&gt;Dropdown Menu&lt;/h2&gt;
  &lt;p&gt;Move the mouse over the button to open the dropdown menu.&lt;/p&gt;
  
  &lt;div class="dropdown"&gt;
    &lt;button class="dropbtn"&gt;Dropdown&lt;/button&gt;
    &lt;div class="dropdown-content"&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;/div&gt;
  </code></pre>