I'm trying to align a series of links at both the top and bottom of my navbar
. This is what I have so far:
https://i.sstatic.net/4ieYn.jpg
After experimenting with Irfandy Jip's code and doing some further research, here's what I've come up with:
<nav class="navbar navbar-expand-lg navbar-light bg-light-blue border-bottom border-burnt-orange" style="border-bottom-width: 4px !important;">
<a class="navbar-brand" href="{{ path('_home') }}">
<img src="{{ asset('build/images/logo-sm.png') }}" class="d-lg-none">
<img src="{{ asset('build/images/logo.png') }}" class="d-none d-lg-block">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<div class="navbar-nav color-dark-blue ml-auto flex-lg-column align-items-lg-start justify-content-lg-center order-lg-2">
<div class="nav-item mb-lg-5">
<div class="btn-group">
<button class="btn btn-link border-dark-blue border-right border-top-0 border-left-0 border-bottom-0 p-0 m-0 d-none d-lg-inline">
<a class="nav-link" href="">Login</a>
</button>
<button class="btn btn-link border-dark-blue border-left border-top-0 border-right-0 border-bottom-0 p-0 m-0 d-none d-lg-inline">
<a class="nav-link" href="">Sign Up</a>
</button>
</div>
</div>
<div class="nav-item mb-lg-5">
<div class="btn-group btn-group-lg">
<button class="btn btn-link p-0 m-0 d-none d-lg-inline">
<a class="nav-link" href=""><i class="far fa-envelope"></i></a>
</button>
<button class="btn btn-link p-0 m-0 d-none d-lg-inline">
<a class="nav-link" href=""><i class="fab fa-facebook-square"></i></a>
</button>
<button class="btn btn-link p-0 m-0 d-none d-lg-inline">
<a class="nav-link" href=""><i class="fab fa-twitter"></i></a>
</button>
</div>
</div>
<a class="nav-link d-lg-none" href="">Login</a>
<a class="nav-link d-lg-none" href="">Sign Up</a>
</div>
<form class="form-inline my-2 pt-5 my-lg-0 mx-auto d-inline w-50 order-lg-1" action="{{ path('_store_search_results') }}">
<div class="input-group">
<input name="search" class="form-control" type="search" placeholder="Search" aria-label="Search">
<div class="input-group-append">
<button class="btn btn-burnt-orange my-2 my-sm-0" type="button"><i class="far fa-search"></i></button>
</div>
</div>
</form>
</div>
</nav> <!-- end nav -->
This setup is almost there, but I'm struggling with the alignment issue where the entire navbar
expands at the bottom due to margins and paddings. My goal is to have the social media icons in line with the search bar while keeping the Login and Sign Up links at the top.
Here's a comparison against a draft layout I'm aiming for:
https://i.sstatic.net/bb5Gt.jpg
Is there any way to tweak the positioning of the right-aligned links to match the desired look?