Can someone help me figure out why my list elements in the navigation bar are not floating to the right as intended?
This is the HTML code:
<body>
<header>
<!--Navigation bar-->
<nav class="navbar navbar-expand-sm bg-light">
<!--Navbar items-->
<ul class="navbar-nav">
<li class="nav-item">
<a href="#" class="nav-link">Register</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Login</a>
</li>
<li class="nav-item">
</li>
</ul>
</nav>
</header>
<!--Javascript files should be linked at the bottom of the page-->
<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.3/umd/popper.min.js"; integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"; integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
</body>
The CSS code is:
body{
background:#262733;
}
.navbar-nav .nav-item {
float: right;
}