title: Bootstrap - Positioning within the navigation bar
body: <p>this code shows my attempt at creating a navigation bar but I can find a way to position everything correctly. I have tried using col-md-3 for several elements but yet I am not able to position them. I was wondering if you would be able to put the search bar in the middle with the links aligned to the right.
  <a href="https://i.stack.imgur.com/HJbnV.png" rel="nofollow noreferrer">What I would like to acheive</a>
  <br>
  The Faulty code is below.
  <br>
  Thank you!</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-html lang-html prettyprint-override"><code>&lt;html lang="en"&gt;
  
  &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
    &lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
      integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"&gt;
  
    &lt;title&gt;NavBar&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
    &lt;nav class="navbar navbar-expand-md navbar-dark bg-dark"&gt;
      &lt;ul class="navbar-nav "&gt;
        &lt;li class="nav-item"&gt;
          &lt;a href="" class="nav-link navbar-brand "&gt;Home&lt;/a&gt;
        &lt;/li&gt;
  
        &lt;li class="nav-item"&gt;
          &lt;form class="mx-auto order-0"&gt;
            &lt;div class="input-group mb-3"&gt;
              &lt;div class="input-group-prepend"&gt;
                &lt;button class="btn btn-outline-secondary" type="button" id="button-addon1"&gt;Button&lt;/button&gt;
              &lt;/div&gt;
              &lt;input type="text" class="form-control" placeholder="" aria-label="Example text with button addon"
                aria-describedby="button-addon1"&gt;
        &lt;/li&gt;
  
        &lt;li class="nav-item"&gt;
          &lt;a href="" class="nav-link"&gt;Link&lt;/a&gt;
        &lt;/li&gt;
  
        &lt;li class="nav-item"&gt;
          &lt;a href="" class="nav-link"&gt;Link2&lt;/a&gt;
        &lt;/li&gt;
        &lt;/form&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>