I am creating a website as a portfolio to present my path in IT but my problem is that my navigation bar has a space between the bar in itself and the rest of the page
I've tried using border,margin,width but none worked
body {
background-color : #B31854;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #900C3F;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #740A33;
}
h1 {
font-family : Schluber;
color : #D7BDE2 ;
}
p {
color : #D7BDE2 ;
width:300px;
margin : auto;
}
<html>
<head>
<link rel="stylesheet" type="text/css" href="file:///F:/Site%20web/Exemple%20css.css">
<style>
</style>
</head>
<body>
<ul>
<li><a class="active" href="#accueil">Accueil</a></li>
<li><a href="#monparcours">Mon Parcours</a></li>
<li><a href="#mesprojets">Mes Projets</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
<center><h1>Bienvenue sur mon portfolio !</h1></center>
</body>
</html>
The expected result is something like the following website navbar : http://axel-chapelain.com/
the actual result is like : https://www.w3schools.com/css/tryit.asp?filename=trycss_navbar_horizontal_black