I edited this because I found a similar post with a working answer on it.
Follow this link. It has to deal with bootstrap 3 but it works with 4 too.
Also read and make sure you use correctly this link.
First of all make sure you have correctly included the stylesheet and script of bootstrap:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
Secondly, make sure that the active class is not overrided by the nav-link
or fa
class that you are using inside the <li></li>
element.
Try to add a new list item to your code and see if it works:
<li class="active"><a href="https://stackoverflow.com/">Stack Overflow</a></li>
If it is not try to create a new class that contains the stylesheet of the active class and use !important. Then add it to your element:
i.e. .myclass{ padding-top: 100px !important; }
If any of the above works make sure that when you are Styling your html/php file you are always Inspecting your project through your browser. There you can add or remove css formats and see the exact style of your element.