Hello ! I can't manage to center my different links in the center of my navigation bar: I'd like it to be really centered so that I can place things like my social networks or other things to the right of these elements
So I tried flexbox to center my elements, after many attempts and days of thinking about how to do it, I come here in the hope that someone will explain me how to do it, I would like to understand where the problem comes from please
I attach below my code:
Codepen : https://codepen.io/antyss77/pen/yLMPOPj
HTML :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Poseidon | The Perfect Discord Bot</title>
<link rel="stylesheet" href="main.css">
<link rel="icon" type="image/svg+xml" href="img/favicon.svg">
</head>
<body>
<header class="topbar">
<a href="#"><img class="header-logo" src="img/logo.svg" alt="Kurium Logo" href="index.html"></a>
<nav>
<a href="invite.html">Invite</a>
<a href="commands.html">Commands</a>
<a href="documentation.html">Documentation</a>
<a href="support.html">Support</a>
</nav>
</header>
<h1>The Perfect Discord Bot.</h1>
<h5>Poseidon is the only Discord bot you'll ever need!</h5>
</body>
</html>
CSS :
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body, html {
font-size: 16px;
color: rgba(0, 0, .87);
font-family: "Montserrat", sans serif;
line-height: 1.6;
margin: 0;
font-weight: 500;
}
.topbar {
height: 80px;
background-color: #fff;
box-shadow: 0 8px 15px rgba(0, 0, 0, .05);
display: flex;
justify-content: space-between;
align-items: center;
text-align: center;
}
.topbar nav {
display: inline-block;
text-align: center;
}
.topbar nav a {
color: #9F9F9F;
text-decoration: none;
font-weight: 500;
padding: 0 20px;
display: inline-block;
text-align: center;
}
.topbar nav a:hover, .topbar nav a.active {
color: #000;
}
.header-logo {
cursor: pointer;
width: 25vh;
}