Everything works perfectly on a large screen, but disappears when resizing. I haven't specified a height property for the navbar. Here's the Fiddle. I know this question has been asked many times before, but I have yet to find a solution that actually works.
The HTML Code:
<nav class="navbar navbar-expand-lg fixed-top">
<a class="navbar-brand" href="#">Title</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav ml-auto">
<a class="nav-item nav-link active" href="#">Home <span class="sr-only">(current)</span></a>
<a class="nav-item nav-link" href="#">About</a>
<a class="nav-item nav-link" href="#">Services</a>
<a class="nav-item nav-link" href="#">Contact</a>
</div>
</div>
</nav>
CSS Styles:
nav{
font-family: 'Montserrat', sans-serif;
background-color: white;
}
nav .navbar-brand{
font-size: 2.5em;
}
nav .bg-custom{
background-color: white !important;
}
nav .nav-link{
color: black;
font-size: 1.3em;
font-weight: 600;
letter-spacing: 0.5px;
margin-right: 1em;
}