To achieve the desired layout, wrap the two rows in separate d-flex
divs and use w-100
to ensure they fill the width of the navbar. Then, apply flex-column
to the navbar to stack the two divs vertically.
<nav class="navbar navbar-expand-md navbar-light flex-column" id="header">
<div class="w-100 d-flex">
<a href="/" class="navbar-brand">
<img src="/images/favicons/favicon_144x144.png" class="favicon-logo" alt="Logo">
</a>
<ul class="navbar-nav navbar-expand px-3 order-last">
<li class="nav-item">
<a class="nav-link text-nowrap nav-small-link" href="" title="Vorgemerkte Gebote auf Ihrer Bietliste">
<div class="icon-wrapper">
<i class="fa fa-gavel fa-fw"></i>
<span class="badge badge-orange" id="bidlist-counter">0</span>
</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link text-nowrap nav-small-link" href="" title="Merkzettel">
<div class="icon-wrapper">
<i class="fa fa-bookmark fa-fw"></i>
<span class="badge badge-orange" id="bookmark-counter">14</span>
</div>
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link text-nowrap dropdown-toggle" href="#" id="navbarDropdownLanguage" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="flag-icon flag-icon-de"></span>
</a>
<div class="dropdown-menu dropdown-langauge dropdown-menu-right" aria-labelledby="navbarDropdownLanguage">
<a class="dropdown-item text-nowrap" href="" hreflang="en">
<span class="flag-icon flag-icon-gb"></span> GB </a>
</div>
</li>
[Rest of the code]
</ul>
[Continuation of the code]
</div>
<div class="navbar-collapse collapse w-100 justify-content-md-center justify-content-start" id="navbarSupportedContent">
<ul class="navbar-nav">
[Navbar content continues...]
</ul>
</div>
</nav>
Note: The hidden-*
classes are not part of Bootstrap 4.
For more information, refer to: How can I have Brand and Navbar on separate lines?