html - Boostrap navbar form and links using navbar-right -
i use navbar-right on navbar-form , navbar-nav ends putting form on 1 row , navbar_nav on row on right. how can navbar show brand on left , on right search field followed nav links.
<nav class="navbar navbar-inverse" role="navigation"> <div class="container-fluid col-sm-12 col-lg-offset-2 col-lg-8"> <!-- brand , toggle grouped better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar_collapse"> <span class="sr-only">toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/" style="white-space:nowrap">site</a> </div> <!-- collect nav links, forms, , other content toggling --> <div class="collapse navbar-collapse" id="navbar_collapse"> <div class="navbar-right"> <form class="navbar-form" role="search" ng-submit="collectionsearch()"> <div class="form-group"> <input type="text" class="form-control" placeholder="collection id" ng-model="csearch" size=10 required> </div> </form> <ul class="nav navbar-nav"> <li id="create_tab"><a href="/">create</a></li> <li id="tests_tab"><a href="#/tests">tests</a></li> <li id="collections_tab"><a href="#/collections">collections</a></li> <li id="account_tab"><a href="#/account">account</a></li> <li id="logout_tab" ><a href="#">logout</a></li> </ul> </div> </div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav>
any suggestions appreciated. thank you!
you need use bootstrap classes navbar-form
, navbar-left
move search icon on left side. here demo.
<form class="navbar-form navbar-left" role="search" ng-submit="collectionsearch()"> </form>
Comments
Post a Comment