I've problem with my menu. I would like add more styles to my last li element. I want to add some background-color. I tried to this with padding but look what happened. Everything is crash (logo and phone number too):
I also tried to do this with box-shadow but I've to change parameters on literally every breakpoints. Is there any universal solution to figure it out?
<div class="topbar">
<div class="logo">
<img src="img/logo.png" alt="Wapik" class="logo-image">
<img src="img/phone.png" alt="Phone" class="phone">
<span>+62 202 555 0117</span>
</div>
<div class="navbar-toggle">
<i class="fas fa-bars"></i>
</div>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About us</a></li>
<li><a href="#">Pricing</a></li>
<li><a href="#">Contact us</a></li>
<li><a href="#">Get started</a></li>
</ul>
</nav>
</div>
CSS
header {
background: linear-gradient(rgba(45,110,112,.8), rgba(45,110,112,.8)), url('img/baner.png');
background-size: cover;
height: 75vh;
position: relative;
}
.topbar {
padding-top: 40px;
display: flex;
justify-content: space-between;
color: #fff;
}
.logo {
display: flex;
}
.logo span{
padding-left: 5px;
}
.logo-image {
border-right: 2px solid #4f6a6a;
padding-right: 20px
}
.phone {
padding-left: 20px;
}
nav ul {
display: flex;
}
nav ul li:not(:last-of-type) {
padding-right: 30px;
}
nav ul li:last-of-type {
background-color: rgba(255,255,255,.3);
padding: 10px 20px;
}