Simple Responsive Navbar
<!DOCTYPE html>
<html lang="en">
<head>
<title>Simple Responsive Navbar</title>
<style>
.navbar{
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
background-color: rgb(106, 69, 192);
padding: 15px;
}
.navbar a{
text-decoration: none;
color: inherit;
}
.logo{
margin-right: 50px;
}
.list{
list-style: none;
display: flex;
gap: 25px;
}
#toggler, .navbar label{
display: none;
}
@media screen and (max-width:600px) {
.menu{
width: 100%;
max-height: 0;
overflow: hidden;
}
.list{
flex-direction: column;
align-items: center;
padding: 20PX;
}
.navbar label{
display: inline-flex;
align-items: center;
cursor: pointer;
}
#toggler:checked ~ .menu{
max-height: 100%;
}
}
</style>
</head>
<body>
<nav class="navbar">
<A href="#" class="logo" >LOGO</A>
<input id="toggler">
<label for="tiggler">
<i class="ri-menu-line"></i>
</label>
<div class="menu">
<ul class="list">
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</nav>
</body>
</html>