I am trying to align the logo and the nav on the same line. The logo is to be on the left of window and the navigation is to be on the right of the window using flexbox.
So far I the logo and navbar appear on the same line (except the last li item in 906px). And they are not on opposite ends.
/* Desktop */
@media (min-width: 900px) {
.logo-name {
display: inline-flex;
background-color: orange;
}
.main-nav {
display: inline-flex;
width: 40%;
justify-content:flex-end;
background-color: blue;
}
}
<header class="main-header">
<h1 class="logo-name"><a href="index.html">R.J Roofer</a></h1
<nav class="main-nav">
<li class="nav-item-1"><a href="#">home</a></li>
<li><a href="#">services</a></li>
<li><a href="#">gallery</a></li>
<li><a href="#">about us</a></li>
<li><a href="#">contact</a></li>
<li><a href="#">FREE QUOTE</a></li>
</nav>
</header>
Any ideas?