Currently, I am working on designing a navigation bar that showcases my brand on the left side, a full-width search bar in the center, and additional pages on the right. I am facing challenges in maintaining the full-width of the search bar without causing the pages on the right to shift to a new row. Furthermore, I am struggling to keep the search bar on the same row in mobile view.
Here is how the layout appears on a smaller screen:
Below is the code snippet for the navbar I am working with, utilizing the default Bootstrap 3 CSS:
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="row">
<span>
<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>
<a class="navbar-brand" href="#">logo</a>
</div>
<form class="navbar-form">
<div class="form-group" style="display:inline;">
<div class="input-group" style="display:table;">
<input class="form-control" name="search" placeholder="Search Here" autocomplete="off" type="text">
<span class="input-group-addon" style="width:1%;"><span class="glyphicon glyphicon-search"></span></span>
</div>
</div>
</form>
</span>
<span>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<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>
</ul>
</ul>
</div>
</span>
</div>
</div>
</nav>
Feel free to view my code progress on this jsfiddle link.
Any insights or assistance offered would be greatly appreciated!