Twitter Bootstrap 3 increasing navbar
Here's my code:
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header" >
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<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="#">Company</a>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
</form>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="#/Activity">Activity</a></li>
<li class="active"><a href="#/Customers">Customers</a></li>
<li><a href="#/Inventory">Inventory</a></li>
<li><a href="#/Orders">Orders</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
Basically, I've been searching through Twitter Bootstrap 3 and Stack-Overflow for the past 2-3 hours.
I would like to increase the width of the div class navbar-header
so that I can have a search input that spans the top middle of the nav bar.
Seems like when the navbar collapses it extends the search Too far.
Example in Fiddle
Basically I want the same thing as Gmail with the Google Logo, Big Search box, icons/links on the right.
Use display:inline
on the form-group
..
Here's a working demo: http://www.bootply.com/Vi3dsd5qLk
链接地址: http://www.djcxy.com/p/69008.html