I'm in the process of crafting a custom navigation bar for my website, with the intention of having my name prominently displayed on the far left while the links float to the far right. I've utilized CSS to style everything within the nav section, but I've encountered an issue when using float for the links - they appear misaligned and in reverse order compared to how I structured the HTML for them.
It's evident that there's a significant problem with my approach to using CSS, so I'm reaching out for some guidance or perhaps suggestions on a better methodology.
I've made the deliberate choice to steer clear of frameworks like Bootstrap or any pre-defined solutions, as I want to hone my skills by hand-coding this component from scratch.
nav {
border-bottom: 1px solid rgb(196, 196, 196);
background-color: #F7F9F9;
padding: 10px;
width: 100%;
}
.navbar a {
float: right;
text-decoration: none;
}
<header>
<nav>
<div class="navbar">
<div>Rick Wilson</div>
<a href="#">Experience</a>
<a href="#">Projects</a>
<a href="#">Technology Stack</a>
<a href="#">Contact</a>
</div>
</nav>
</header>