1
votes

enter image description here

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
ml-auto class to that last link which will occupy the remainign space and therefor push that element to the far right.tacoshy
Hi and Welcome to SO. Please take the tour first. Then read how to ask questions here. After that edit the question to meet the guidelines and provide a minimal reproducible example for debugging details. Please also read why an image of your code is not acceptable.tacoshy

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!