Hey there, I have a question that might sound newbie. I want to create a fixed side navigation bar using bootstrap 4. When I add the 'fixed-top' class, it does fix the position but the text in my navbar overflows and looks messy:
https://i.sstatic.net/QT4By.jpg
On the other hand, without the 'fixed-top' class, it looks fine (but doesn't stay in place when scrolling):
https://i.sstatic.net/4fYH6.jpg
Can anyone point out what mistake I am making?
You can check out the simple example on jsfiddle, or see the code below:
<div class="container-fluid">
<div class="row">
<div class="col-sm-2 p-0 bg-dark">
<nav class="navbar navbar-dark px-0 fixed-top"> <!--remove fixed-top and it's fine-->
<ul class="nav flex-column navbar-nav">
<li class="nav-item"><a href="index.html" class="nav-link">Home</a></li>
<li class="nav-item"><a href="hello.html" class="nav-link">Hello</a></li>
<li class="nav-item"><a href="howdy.html" class="nav-link">Longword and longword</a></li>
</ul>
</nav>
</div>
<div class="col-10 bg-primary">
blalbllala
blalbllala
blalbllala
blalbllala
<br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br>
blalbllala
blalbllala
blalbllala
blalbllala
blalbllala <br>
</div>
</div>
</div>
Thank you!