Navbar w/o navbar-brand breaks with navbar-toggler-right(-left)
Created by: iatek
When you create a navbar with only a navbar-nav
component (no navbar-brand
), and then use navbar-toggler-right
or navbar-toggler-left
, the entire navbar height collapses when the toggler is shown.
http://www.codeply.com/go/smB7eC4qYc
A workaround I've found is to use an navbar-text
placeholder...
<nav class="navbar navbar-toggleable-md navbar-light bg-faded">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarToggler1" aria-controls="navbarToggler1" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"> </span>
</button>
<span class="navbar-text"> </span>
<div class="collapse navbar-collapse" id="navbarToggler1">
<ul class="navbar-nav mr-auto mt-2 mt-md-0">
<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="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>