<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar" />
<span class="icon-bar" />
<span class="icon-bar" />
</button> <a class="navbar-brand" href="#">QA</a>
<button type="button" class="btn btn-default navbar-btn">Sign in</button>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active">
<a href="#">About<span class="sr-only">(current)</span></a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Menu<span class="caret"/></a>
<ul class="dropdown-menu">
<li>
<a href="#">Action</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
My question is the following: Is it possible in Bootstrap to have the button from the navbar inside the toggle menu as a link and not as a button? Lets say the user goes from desktop to mobile resolution and he clicks the hamburger menu and the link 'Sign In' is displayed but not as a button anymore
Add hidden-xs
class to the button in your nav bar
<button type="button" class="btn btn-default navbar-btn hidden-xs">Sign in</button>
Add a menu item with class visible-xs
somewhere in your menu
<li class="visible-xs"><a href="#">Sign In</a></li>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments