I have been trying to figure this problem out for a while now. I will best be able to explain it if I actually represent it visually:
I am trying to vertically align my navigation bar.
I have tried using align-self
however nothing seems to be changing.
/* Navigation */
.navigation {
overflow: hidden;
margin: 0;
align-self: center;
}
.navigation a {
display: block;
float: right;
color: #f2f2f2;
text-align: center;
text-decoration: none;
font-family: 'Quicksand', sans-serif;
font-size: 1rem;
}
.navigation a:hover {
background-color: #ddd;
color: black;
}
/* Hide the link that should open and close the navigation on small screens */
.navigation .icon {
display: none;
}
Is this a case of me getting confused with my css, or a case with incorrect div positioning?
<!-- Navigation bar -->
<div class="navigation" id="myNavigation">
<a href="index.html">Home</a>
<a href="#services">About Me</a>
<a href="#about-me">Services</a>
<a href="#portfolio">Portfolio</a>
<a href="#contact">Contact</a>
<a href="javascript:void(0);" class="icon" onclick="openNavigation()">☰</a>
</div>
</div>