I am having a problem with the CSS of the navbar of a Website. Please help me move the items to the right side and deal with 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;
}
I have tried many times but I am not able to fix the problem. The items always stick together.