I was following a tutorial on how to make a responsive navbar for both desktop and mobile users. I didn't exactly follow through because I had to change my CSS because I had an image logo. When I was attempting to make the hamburger menu, I couldn't see all my nav-links in a column. Just to clarify, I want to make the hamburger lines on the right side and make it function like an app.
/* Basic */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Acme', sans-serif;
background: white;
line-height: 1.6;
}
ul {
list-style: none;
}
a {
text-decoration: none;
}
/* Navbar */
.navbar {
display: flex;
background: #004C66;
align-items: center;
justify-content: space-between;
width: 100%;
position: fixed;
padding: 0 30px;
}
.navbar .logo img {
width: 100%;
margin-top: 10px;
}
.navbar .nav-link {
padding: 10px 50px;
color: #333;
background-color: red;
}
/* Burger Navigation */
.burger {
display: none;
}
.burger div {
width: 25px;
height: 2px;
background-color: #333;
margin: 5px;
border-radius: 25%;
}
@media (max-width: 813px) {
.nav-link {
position: absolute;
padding: none;
right: 0px;
height: 92vh;
top: 8vh;
display: flex;
flex-direction: column;
align-items: center;
width: 50%;
}
}
<body>
<header class="navbar">
<a href="" class="logo"><img src="/img/logoS.png" alt=""></a>
<nav>
<ul>
<a class="nav-link" href="#">Home</a>
<a class="nav-link" href="#">Services</a>
<a class="nav-link" href="#">Contact</a>
</ul>
</nav>
<div class="burger">
<div class="line1"></div>
<div class="line2"></div>
<div class="line3"></div>
</div>
</header>
</body>