Seeking assistance with adjusting the CSS of a website's navbar. Looking for help to align items to the right and ensure responsiveness.
HTML:
<nav>
<a href="#" class="logo"><img src="./images/logo.png" height="120" width="120"></a>
<ul>
<li><a class="active" href="#">Home</a></li>
<li><a href="#">How to MUN</a></li>
<li><a href="#">Sponsors</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
CSS:
body, html {
height: 100%;
margin: 0;
font-size: 16px;
font-family: "Lato", sans-serif;
font-weight: 400;
line-height: 1.8em;
color: #666;
}
nav {
position: absolute;
display: flex;
align-items: center;
padding: 30px 90px;
z-index: 99;
}
nav .logo {
color: #fff;
font-weight: 700;
text-decoration: none;
font-size: 2rem;
text-transform: uppercase;
letter-spacing: 2px;
}
nav ul {
display: flex;
justify-content: center;
align-items: center;
}
nav ul li {
list-style: none;
margin-left: 20px;
}
nav ul li a {
text-decoration: none;
padding: 6px 15px;
color: #ffff;
border-radius: 20px;
}
nav ul li a:hover,
.active {
background: #fff;
color: #2b1055;
}
Struggling to resolve the issue despite multiple attempts. The items are consistently grouped together.