Navbars

Bootstrap comes with a complete solution for navigation bars. If you want to find out more about how to create one and align the items inside it, check out our Bootstrap 4 navbar tutorial where we go into details.

The design is improved inside the Lazy Kit. Here is how a basic example looks like.

<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
  <div class="container">
    <a class="navbar-brand d-flex align-items-center" href="#lazy">Lazy Kit</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown-1" aria-controls="navbarNavDropdown-1"
      aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse text-center" id="navbarNavDropdown-1">
      <ul class="navbar-nav ml-auto">
        <li class="nav-item active">
          <a class="nav-link" href="#">Home
            <span class="sr-only">(current)</span>
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#">Features</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#">Pricing</a>
        </li>
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#a" id="navbarDropdownMenuLink" data-toggle="dropdown"
            aria-haspopup="true" aria-expanded="false">
            Services
          </a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
            <a class="dropdown-item" href="#">Design</a>
            <a class="dropdown-item" href="#">Development</a>
            <a class="dropdown-item" href="#">Marketing</a>
          </div>
        </li>
      </ul>
    </div>
  </div>
</nav>

Contextual Classes

You can modify the color of the navbar using the background color utilities. Here is an example with the info background.

<nav class="navbar navbar-expand-lg navbar-dark bg-info">
  <div class="container">
    <a class="navbar-brand d-flex align-items-center" href="#lazy">Lazy Kit</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown-3" aria-controls="navbarNavDropdown-3"
      aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse mr-auto text-center" id="navbarNavDropdown-3">
      <ul class="navbar-nav ml-auto">
        <li class="nav-item">
          <a class="nav-link" href="#">
            <i class="fab fa-twitter"></i> Twitter
          </a>
        </li>

        <li class="nav-item">
          <a class="nav-link" href="#">
            <i class="fab fa-facebook-f"></i> Facebook
          </a>
        </li>

        <li class="nav-item">
          <a class="nav-link" href="#">
            <i class="fab fa-github"></i> Github
          </a>
        </li>
      </ul>
    </div>
  </div>
</nav>