Well .pull-*
isn't going to work because it was dropped in Bootstrap 4 in favor of .float-*
You're on the right track with .ml-auto
though; you're just not applying it at the correct point.
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js" integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
<nav class="navbar navbar-expand navbar-light bg-light">
<span class="navbar-brand text-color">MYlestone</span>
<div class="navbar-nav w-100">
<a class="nav-item nav-link" href="#">My Content</a>
<a class="nav-item nav-link" href="#">About</a>
<div class="ml-auto">
<a class="nav-item nav-link" href="#">Logout</a>
</div>
</div>
</nav>
First you need to add .w-100
to your .navbar-nav
to make sure that that element takes up 100% of the remaining space. Then you need to wrap your final .nav-link
in a wrapper with .ml-auto
applied.
One caveat I would offer; there might be a better way: There is no reason you cannot have multiple .navbar-nav
elements. As long as they are within the same collapse they'll condense down into your hamburger menu should you opt to use it.
The following code would achieve the same results as the above; just utilizing multiple navigational menus:
<nav class="navbar navbar-expand navbar-light bg-light">
<span class="navbar-brand text-color">MYlestone</span>
<div class="navbar-nav">
<a class="nav-item nav-link" href="#">My Content</a>
<a class="nav-item nav-link" href="#">About</a>
</div>
<div class="navbar-nav ml-auto">
<a class="nav-item nav-link" href="#">Logout</a>
</div>
</nav>