I have just a simple html:
<body>
<header id="cabecalho">
<nav id="menu">
<ul>
<li>Home</li>
<li>Projects</li>
<li>Contact</li>
</ul>
</nav>
</header>
</body>
CSS :
<style>
*{
padding: 0;
margin: 0;
}
html{
width: 100%;
height: 100%;
}
body{
width: 100%;
height: 100%;
}
header#cabecalho{
width: 100%;
height: 5%;
background-color: rgb(60, 92, 86);
overflow: hidden;
}
nav#menu{
display: block;
height: 50%;
width: 100%;
overflow: hidden;
margin-top: auto;
margin-bottom: auto;
}
nav#menu ul{
height: 100%;
width: 100%;
list-style: none;
}
nav#menu ul li{
display:inline-block;
color: white;
}
</style>
I just want to vertical centralize the menu in the header, but it keeps on the top of it. obs: using margin: x Pixels works, but i don't think this is the best way to deal with that.