"Responsive Navbar with Slider Search"
Bootstrap 3.3.0 Snippet by simeonsampson93

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <img src="//placehold.it/192x50" class="img-responsive" href="#"> </div> <div class="navbar-collapse collapse" id="searchbar"> <ul class="nav navbar-nav navbar-left"> <!-- ORIGINAL MENU <li><a href="about.html">About</a></li> <li id="userPage"> <a href="#@userpage"><i class="icon-user"></i> My Page</a> </li> <li><a href="#logout" data-prevent="">Logout</a></li> --> <li class="dropdown-active"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li class="divider"></li> <li><a href="#">Separated link</a></li> <li class="divider"></li> <li><a href="#">One more separated link</a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li class="divider"></li> <li><a href="#">Separated link</a></li> <li class="divider"></li> <li><a href="#">One more separated link</a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li class="divider"></li> <li><a href="#">Separated link</a></li> <li class="divider"></li> <li><a href="#">One more separated link</a></li> </ul> </li> </ul> <ul class="nav navbar-nav navbar-right"> <li> <div class="search"> <input type="text" class="form-control input-sm" maxlength="64" placeholder="Search" /> <button type="submit" class="btn btn-primary btn-sm">Search</button> </div> </li> </ul> </div><!--/.nav-collapse --> </div> </div>
#search { float: right; margin-top: 9px; width: 250px; } .search { padding: 5px 0; width: 230px; height: 30px; position: relative; left: 10px; float: left; line-height: 22px; } .search input { position: absolute; width: 0px; float: Left; margin-left: 210px; -webkit-transition: all 0.7s ease-in-out; -moz-transition: all 0.7s ease-in-out; -o-transition: all 0.7s ease-in-out; transition: all 0.7s ease-in-out; height: 30px; line-height: 18px; padding: 0 2px 0 2px; border-radius:1px; } .search:hover input, .search input:focus { width: 200px; margin-left: 0px; } .btn { height: 30px; position: absolute; right: 0; top: 5px; border-radius:1px; }

Related: See More


Questions / Comments: