When creating my portfolio, I wanted to align my name on the left side of the navbar and have the list items appear on the right. Despite using the float:right property in my CSS, the list items did not move to the right as intended. Below is the code snippet I am working with, which utilizes Bootstrap.
<nav class = "navbar navbar-expand-md navbar-dark bg-dark">
<h1> Aiya Siddig</h1>
<ul class = "navbar-nav">
<li class = "nav-item">
<a class = "nav-link" href = "index.html"> About Me </a>
</li>
<li class = "nav-item">
<a class = "nav-link" href = "portfolio.html"> Portfolio </a>
</li>
<li class = "nav-item">
<a class = "nav-link" href = "contact.html"> Contact </a>
</li>
</ul>
</nav>
CSS:
.nav-link, .nav-item {
font-size: 18px;
text-align:right;
float:right;
}
h1 {
color: rgb(236, 236, 236);
}