Создание burger-menu в header
не получается сделать бургер меню в css. Необходимо, чтобы бургер-меню располагалось справа, а у меня оно слева и весь текст header заплыл на логотип.
<div class="header">
<div class="header-section">
<div class="header-item header-logo">
Belzer<br>Design
</div>
<div class="header-burger">
<span></span>
</div>
<div class="header-item"><a href="">Главная</a></div>
<div class="header-item"><a href="">Цены</a></div>
<div class="header-item"><a href="">Портфолио</a></div>
<div class="header-item"><a href="">О заказе</a></div>
<div class="header-item"><a href="">Об оплате</a></div>
<div class="header-item-2"><a href="">О нас</a></div>
</div>
</div>
.header {
display: flex;
justify-content: space-between;
background-image: url('/img/header.png');
background-repeat: no-repeat;
overflow:visible;
z-index: 2;
padding: 8px 0px 8px;
color: #fff;
&-section {
margin-left: 166px;
display: flex;
align-items: center;
}
&-item {
font-weight: bold;
margin-right: 75px;
z-index: 2;
&-2 {
font-weight: bold;
:hover {
transition: 0.5s;
color: #E0E0E0;
}
}
:hover {
transition: 0.5s;
color: #ececec;
}
}
&-logo {
text-transform: uppercase;
font-weight: bold;
font-size: 18px;
z-index: 3;
}
&-burger {
display: none;
}
}
@media (max-width: 768px) {
.header {
height: 50px;
}
.header-logo {
flex: 0 0 40px;
}
.header-burger {
display: block;
position: relative;
width: 30px;
height: 20px;
z-index: 3;
}
.header-burger span {
position: absolute;
background-color: #fff;
left: 0;
width: 100%;
height: 2px;
top: 9px;
}
.header-burger:before,
.header-burger:after {
content: '';
background-color: #fff;
position: absolute;
width: 100%;
height: 2px;
left: 0;
}
.header-burger:before {
top: 0;
}
.header-burger:after {
bottom: 0;
}
.header-item {
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
}
