Forms in the Navbar
We can plane forms inside our navbar for easy access, most commonly used example is of a search form. For adding form inside our navbar we only need to add two classes .form-inline
class on the form container and .form-control
class on the form elements
<nav class="navbar bg-dark navbar-dark navbar-expand-md">
<ul class="navbar-nav">
<li class="nav-item"><a class=" nav-link" href="#">Home</a></li>
<li class="nav-item"><a class=" nav-link" href="#">About</a></li>
<li class="nav-item"><a class=" nav-link" href="#">Contact</a></li>
</ul>
<form class="form-inline">
<input class="form-control" type="text" placeholder="Search" />
</form>
</nav>