After trying various approaches, I am still struggling to keep the icons in the top right corner when transitioning to mobile view without duplicating them. The desired order is as follows:
on desktop: brand (far left) - nav links (middle) - account & cart icons (right hand side)
on small devices: brand (left corner) - account & cart icons (right hand side) - (right corner)
<nav class="navbar navbar-light bg-light navbar-expand-md justify-content-center-md">
<a class="navbar-brand col-2" href="#">Navbar</a>
<div class="navbar-collapse text-right col col-auto collapse show" id="navbarSupportedContent" style="">
<ul class="navbar-nav mx-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
</div>
<div class="col-auto col-md-3">
<div class="row">
<div class="col-sm-12 justify-content-end d-flex">
<a class="">
Icon
</a>
<a>
Icon
</a>
<a class="">Icon</a>
<div class="">
<button class="navbar-toggler" type="button" data-toggle="collapse" >
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
</div>
</div>
</nav>
EDIT: A simpler demonstration can be found here: https://jsfiddle.net/2dyLzvno/ Everything looks fine until the screen size is reduced to mobile view and collapses. At that point, the links appear above instead of below. I'm unable to find a solution for this issue.
EDIT 2: