I am currently in the process of constructing a new website using Bootstrap, and I have implemented a NavBar. On desktop and tablet screens, the NavBar appears as desired with links and a Search Box situated in the right corner:
https://i.sstatic.net/KWihJ.png
However, on mobile devices, I find it inconvenient to have the search feature at the bottom of the menu:
https://i.sstatic.net/4fMni.png
To provide an example of my code, I have created a Fiddle:
https://jsfiddle.net/hpxgowa8/
Below is the code snippet for reference:
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="javascript:void(0)">Gravity Now!</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navb">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navb">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)">Calculator</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)">Comparison</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)">About</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search">
</form>
</div>
</nav>
I am seeking advice on how to reposition the Search Box as the first element when the hamburger menu is visible. Any suggestions would be greatly appreciated.