How can I horizontally and vertically center nav listed in a ul list on a page?
Below is the Html and CSS code
.nav{
width: 100%;
height: 100%;
position: fixed;
background-color: white;
overflow: hidden;
}
.menu a{
padding: 30px;
color: black;
text-align: center;
left: 0;
margin: 0 auto;
flex: none;
display: flex;
align-items: center;
justify-content: center;
}
<nav class="nav">
<ul class="menu">
<li><a href="#">Google Store</a></li>
<li><a href="#">Google Search</a> </li>
<li><a href="#">Spotify</a></li>
<li><a href="#">Spotify Blog</a></li>
<li><a href="#">Squarespace</a></li>
<li><a href="#">Other work</a></li>
</ul>
</nav>
I tried aligning the items by using the CSS flex method.