Currently, I am working on The Odin Project and trying to create a landing page. I have encountered an issue where my navbar is positioned on the left side when I want it to be on the right side. Here is the code I am using:
.container{
width:100%;
height:27vh;
background-color: #1f2937;
position:static;
}
.footer{
position: fixed;
bottom: 0px;
width: 100%;
height: 10vh;
background-color:#1f2937;
color: white;
text-align: center;
justify-content: center;
display: flex;
}
.headerlogo {
font-size: 20px;
font-family: 'Times New Roman', Times, serif;
}
.navbar {
position: fixed;
width: 85%;
margin: auto;
padding: 35px 0;
display: flex;
align-items: center;
justify-content: space-between;
top: -30px;
flex-direction: row;
}
.navbar ul li {
list-style: none;
display: inline-block;
margin: 0 20px;
color:white;
text-decoration: none;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Website</title>
<link href="style.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="navbar">
<ul>
<li><a href="index.html">header link one</a></li>
<li><a href="index.html">header link two</a></li>
<li><a href="index.html">header link three</a></li>
</ul>
</div>
</div>
<div class="footer">
Copyright © The Odin Project 2021
</div>
</body>
</html>
I have attempted using justify-content: space-between to move the navbar to the right side, but I have been stuck on this problem for hours without finding a solution. Any help would be greatly appreciated.