<nav class="navbar navbar-expand-sm fixed-top navbar-dark bg-dark">
<a class="navbar-brand" href="#">Yehee-Lounge</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">
<ul class="navbar-nav mr-auto">
<li class="nav-item active"><a class="nav-link scroll" href="#top">Home</a></li>
<li class="nav-item"><a class="nav-link scroll" href="#features">About</a></li>
<li class="nav-item"><a class="nav-link scroll" href="#features">Learn Yeehee</a></li>
<li class="nav-item"><a class="nav-link scroll" href="#features">Courses</a></li>
<li class="nav-item"><a class="nav-link scroll" href="#features">Events</a></li>
<li class="nav-item"><a class="nav-link scroll" href="#features">Impression</a></li>
<li class="nav-item"><a class="nav-link scroll" href="#features">Contact</a></li>
<li class="nav-item"><a class="nav-link scroll" href="#features">Newsletter</a></li>
</ul>
<!-- <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> -->
</div>
</nav>
I have created a simple Bootstrap 4 navbar, but I am facing an issue where the height of "Learn Yeehee" increases before collapsing when I reduce the screen width. I want it to stay at the same height until it collapses. How can I achieve this? Please refer to the images linked below for better understanding:
Before Collapse:
https://i.sstatic.net/YKLkX.png
During Collapse:
https://i.sstatic.net/n8GaG.png
After Collapse: