I am trying to center my unordered list with my h1, I have my unordered list within a flexbox however it just simply doesn't work and is a bit off to the right and I can see the padding is a bit weird.
body {
margin: 0;
padding: 0;
}
header {
text-align: center;
}
header nav {
display: flex;
justify-content: center;
}
header h1 {
margin: 0%;
}
header nav ul {
list-style-type: none;
}
header nav ul li a {
color: black;
text-decoration: none;
}
header nav ul li {
display: inline;
}
<!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">
<link rel="stylesheet" href="css/main.css">
<title>Home page</title>
</head>
<body>
<header>
<h1>Kaihans Webbsida</h1>
<nav>
<ul>
<li><a href="#">Historia</a></li>
<li><a href="#">Intressen</a></li>
<li><a href="#">Framtiden</a></li>
</ul>
</nav>
</header>
</body>
</html>
I have tried changing where I have my flexbox, however despite the changes, it just doesn't work.