I'm tring to use a bootstrap navbar and I'd like align one Link, the last, to the right. I searched on the documentation, but i didn't find any usefull answer. Hope you can Help me
1
votes
1 Answers
0
votes
try adding the property ms-auto, ms-right, or ms-left depending on what side you're trying to align towards. here is an example, I was just working on that
<div class="collapse navbar-collapse" id="navbar">
<ul class="navbar-nav ms-auto">
<li class="nav-item active" aria-current="page">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="portfolio-overview.html">Portfolio</a>
</li>
</ul>
in my case they align towards the right, but if you change it for ms-right the links will move to the right.
hope that works for you!
ml-auto
class to that last link which will occupy the remainign space and therefor push that element to the far right. – tacoshy