title: Moving an item inside of a flex container to the right
body: <p>I'm trying to move the register button from the middle to the right (as see on the following photos) Without it affecting the 3 items in the middle.</p>
  
  <p><strong>So this is what I have:</strong>
  <a href="https://i.stack.imgur.com/8SAij.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8SAij.png" alt="present: CSS Menu Bar"></a></p>
  
  <p><strong>This is what I'm trying to get:</strong>
  <a href="https://i.stack.imgur.com/sFNU8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sFNU8.png" alt="Desired: CSS Menu Bar"></a></p>
  
  <p>Here is my code:</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 {
    background-color: #323642;
  }
  
  .menubar {
    justify-content: center;
    display: flex;
    flex-direction: row;
    background-color: #272a33;
    margin-top: -10px;
    margin-left: -10px;
    margin-right: -10px;
    align-items: center;
    height: 100%;
  }
  
  .menuitem {
    padding: 11px;
    padding-top: 17px;
    padding-left: 29px;
    font-size: 22px;
    font-family: "Ostrich Sans";
    color: #ee5f95;
    text-decoration: none;
  }
  
  #login_button {
    margin-top: 2px;
    border-radius: 5px;
    background-color: #ee5f95;
    width: 100px;
    height: 34px;
    text-align: center;
    border: none;
    font-family: "Ostrich Sans";
    font-size: 22px;
    color: white;
    line-height: 33px;
    transition: 0.7s;
    justify-content: flex-end;
  }
  
  #login_button:hover {
    width: 110px;
    background-color: #ae466d;
    transition: 0.7s;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;head lang="Eng"&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;test &lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div class="menubar" id="hey"&gt;
      &lt;a class="menuitem" id="firstmenuitem" href="./buy_sell.html"&gt;Buy &amp; Sell&lt;/a&gt;
      &lt;a class="menuitem" href="./exchange.html"&gt;Exchange&lt;/a&gt;
      &lt;a class="menuitem" href="./events.html"&gt;Events&lt;/a&gt;
      &lt;div id="delimeter"&gt;&lt;/div&gt;
      &lt;button id="login_button"&gt;Register&lt;/button&gt;
    &lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have tried adding <code>margin-right:auto;</code> though it just completly shifter the button to the right and didn't leve any space between it and the window. I have also tried adding <code>justify-content: space-between;</code> but it didn't give me what I wanted. if anyone could help that would be greatly appreciated!</p>