'Bootstrap navbar, aligning right instead of left
i hope someone can help me with the following: Why does this piece of HTML code for bootstrap navbar gives my Home to the right instead of left?
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Navbar</a>
<div class="navbar-nav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
</ul>
</div>
</div>
</nav>
It works if i change <div class="navbar-nav"> to <div class="collapse navbar-collapse" id="navbarNav">
, but then the Home dissapears when scaling the browser window down, i dont want it collapsing. So how can i have it on the left, as simple as possible without collapsing or any other special effects? Here is an image of the left alignment:Scenario
Solution 1:[1]
add class navbar-nav mr-auto in ul
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
