Hey in my code the Br tag aka break line tag is not working. Here is the code:
* {
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
}
nav {
background: black;
color: white;
height: 76px;
line-height: 76px;
color: white;
}
a {
color: white;
text-decoration: none;
}
#nav-button,
label {
display: none;
}
@media only screen and (max-width: 600px) {
.nav-links {}
nav {
height: 200px !important;
}
nav:not(".nav-links") {
line-height: 76px !important;
}
label {
display: block;
padding: 0px 10px;
font-size: 30px;
cursor: pointer;
color: black;
}
.menu-btn,
label {
display: inline;
color: white !important;
}
.menu-btn {
position: absolute;
right: 4px;
}
nav {
display: flex;
}
ul,
li {
list-style-type: none;
}
}
@media(min-width: 600px) {
ul {
display: none;
}
nav {
display: flex;
justify-content: space-between;
}
.nav-links a {
transition: .2s ease-in-out;
font-size: 20px;
padding: 7px 13px;
}
.nav-links a:hover,
.nav-links .active {
background: white;
color: black;
border-radius: 12px;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page title</title>
<link rel="stylesheet" href="css.css">
</link>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="css.js"></script>
<script src="https://kit.fontawesome.com/e8f9edfb9f.js" crossorigin="anonymous"></script>
</head>
<body>
<nav>
<h1> <a href="css.html" class="title">Logo</a>
</h1>
<span class="menu-btn">
<input type="checkbox" id="nav-button">
<label for="nav-button">☰</label>
</span><br style="display: block;">
<div class="nav-links">
<a href="#" class="active">Item 1</a> <a href="#">Item 2</a> <a href="#">Item 3</a> <a href="#">Item 4</a>
</div><br>
</nav>
</body>
</html>
and I also have display block to br tag and also other online solution but that did not work and you don't have to worry about the desktop version. Here are some images Desktop Navbar
⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀