span and nav same line bootstrap code example

Example 1: display li in navbar in the same line

.container {
  display:flex;
  justify-content:space-between;
  align-items:center;  
}

Example 2: display li in navbar in the same line

<div id="main-header">
  <div class="container">
    <h1 id="logo">HM</h1>
    <nav id="navbar">
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Projects</a></li>
        <li><a href="#" target="_blank">Github</a></li>
        <li><a href="#" target="_blank">Twitter</a></li>
      </ul>
    </nav>
  </div>
</div>

Tags:

Misc Example