My current setup includes a logo div followed by a navbar. When viewed on smaller screens like mobile phones, I collapse the navbar. However, I want the collapsed navbar to be positioned next to the logo image.
Is there a way to make the collapsed navbar appear beside the logo div? https://i.sstatic.net/YIAc4.png
Any suggestions on how to achieve this?
<div class="container-fluid bg-light">
<div class="row"><img src="logo.jpg" class="float-left ml-3 img-responsive" width="250" height="150" /></div>
</div>
<nav class="navbar navbar-expand-md navbar-light bg-primary container-fluid">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar5">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="navbar5">
<ul class="navbar-nav ">
<li class="nav-item px-3 active">
<a class="nav-link" href="#">Menu1 <span class="sr-only">Menu1</span></a>
</li>
<li class="nav-item px-3">
<a class="nav-link" href="#">Menu2</a>
</li>
<!-- Dropdown -->
<li class="nav-item px-3 dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
Menu3
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Menu4</a>
<a class="dropdown-item" href="#">Menu5</a>
</div>
</li>
<li class="nav-item px-3">
<a class="nav-link" href="#">Menu6</a>
</li>
<li class="nav-item px-3">
<a class="nav-link" href="#">Menu7</a>
</li>
<li class="nav-item px-3">
<a class="nav-link" href="#">Menu8</a>
</li>
<li class="nav-item px-3">
</li>
</ul>
</div>
</nav>
I'm utilizing Bootstrap 4 for this task.