if I align my icons within my navbar with display: flex
, it shows an underline below my icons. If I disable it, they disappear but my icons aren't align properly. See images below.
How can I get rid of them?
Here's the code:
.nav {
width: 60px;
height: 100vh;
top: 100px;
min-height: 100vh;
background-color: #cccccc;
position: fixed;
z-index: 999;
opacity: .4;
border-right: 1px solid black;
display: flex;
flex-direction: column;
}
.nav a {
width: 100%;
height: 60px;
display: flex;
justify-content: center;
align-items: center;
border: none;
}
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<div class="nav">
<a href=""><i class="material-icons">home</i></a>
<a href=""><i class="material-icons">shopping_basket</i></a>
<a href=""><i class="material-icons">business</i></a>
<a href=""><i class="material-icons">mail</i></a>
<a href=""><i class="material-icons">card_giftcard</i></a>
</div>