0
Hi I created 2 lists inside a navbar, but the list left ta at the top and right at the bottom, I wanted them to be on the same level,
*{
margin: 0;
padding: 0;
}
nav.top{
width: 100%;
background: crimson;
padding-bottom: 10px;
padding-top: 10px;
}
.esquerda{
text-align: left;
padding: 0;
}
.direita{
text-align: right;
margin-right: 15px;
}
nav ul li{
list-style: none;
display: inline-block;
color: #fff;
font-size: 17px;
cursor: pointer;
text-align: center;
border-right: 1px solid #fff;
line-height: 1;
padding-left: 10px;
padding-right: 10px;
}
nav ul li:nth-child(6){
border-right: 4px solid transparent;
}
ul.esquerda li:nth-child(2){
border-right: 4px solid transparent;
}
nav ul li i{
margin: 0 15px;
}
nav ul li:hover{
background: #000;
color: #fff;
}
nav ul li a{
border-right: 1px solid #fff;
line-height: 1;
background: #fff;
}
@media (max-width:800px){
.esquerda{
display: none;
}
.direita{
display: none;
}
nav.top{
display: none;
}
}
<nav class="top">
<ul class="esquerda">
<li><i class="fa fa-home"></i>About</li>
<li><i class="fa fa-home"></i>About</li>
</ul>
<ul class="direita">
<li><i class="fa fa-home"></i>About</li>
<li><i class="fa fa-pencil"></i>Portfolio</li>
<li><i class="fa fa-envelope"></i>Contact</li>
<li><i class="fa fa-home"></i>About</li>
<li><i class="fa fa-pencil"></i>Portfolio</li>
<li><i class="fa fa-envelope"></i>Contact</li>
</ul>
</nav>
</div>
<h1>TEXTO</h1>
Thanks Hugo to starting in flexbox, obg fico otmo here, abraços desde o do grupo CSS Br.
– Js level
@Jslevel this ai study a lot Flex, it helps a lot to build layouts! Tmj
– hugocsl