title: How can i vertically center an image in a bootstrap 4 navbar
body: <p><strong>EDITED:</strong> Updated the code snippet</p>
  
  <p>I'm using Bootstrap4 to build an app's frontend and i'm trying to achieve a navbar effect similar to the one present in AdminLTE dashboard package, where the user's name and photo are side by side in the top navbar but i can't get the items to vertically align correctly since BS4 uses relative dimensions.</p>
  
  <p><a href="https://i.stack.imgur.com/r5kwt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r5kwt.jpg" alt="AdminLTE navbar"></a></p>
  
  <p>I've tried playing around with utility classes but can't seem to figure out how to properly align the elements. Here's some of the markup:</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;nav class="navbar sticky-top navbar-expand-md navbar-dark"&gt;
    &lt;div class="navbar-collapse collapse"&gt;
      &lt;ul class="navbar-nav mr-auto"&gt;
        &lt;li class="user nav-item"&gt;
          &lt;a class="nav-link" href="#"&gt;
  Link 1        &lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="user nav-item"&gt;
          &lt;a class="nav-link" href="#"&gt;
            Link 2
          &lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="user nav-item"&gt;
          &lt;a class="nav-link" href="#"&gt;
            Link 3
          &lt;/a&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
      &lt;ul class="navbar-nav"&gt;
        &lt;li class="user nav-item"&gt;
          &lt;a class="nav-link" href="#"&gt;
            Link 4
          &lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="user nav-item"&gt;
          &lt;a class="nav-link" href="#"&gt;
            Link 5
          &lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="user nav-item dropdown"&gt;
          &lt;a class="nav-link" href="#"&gt;
            &lt;img src="user.jpg" class="rounded-circle"&gt; Username
          &lt;/a&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/nav&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thanks in advance.</p>