My Hamburger menu navigation isnt closing after clicking on link - html

I followed youtube tutorial, becouse I a m new and still learning front-end. When the menu is on deskop resolution, it is in a line, but when it gets to mobile resolution it changes to hamburger menu. Is is working fine, but after I click some link, I want it to close, becouse otherwise you cant see the content of the page.
nav {
height: 75px;
width: 100%;
background-color: #171c1f;
display: flex;
justify-content: space-between;
z-index: 99;
}
.logo-container {
display: flex;
align-items: center;
width: auto;
margin: 0;
}
.logo-txt {
font-size: 35px;
line-height: 75px;
padding-left: 30px;
font-family: 'Signika Negative', sans-serif;
font-weight: bold;
color: rgb(255, 255, 255);
cursor: pointer;
}
.nav-list {
position: fixed;
width: 100%;
height: 0vh;
top: 75px;
background: #4a499e;
float: right;
text-align: center;
transition: all .5s;
z-index: 2;
}
.nav-list li {
opacity: 0;
line-height: 30px;
margin: 50px 0;
transition: all .5s;
}
.nav-list li a {
color: #fff;
font-size: 27.5px;
text-transform: uppercase;
text-decoration: none;
font-weight: 900;
transition: .5s;
}
.nav-list li a.active,.nav-list li a:hover{
color: #00b1f7;
transition: 0.5s;
}
.hamburger-btn {
display: block;
font-size: 30px;
color: white;
float: right;
line-height: 75px;
margin-right: 40px;
cursor: pointer;
}
#check {
display: none;
}
#check:checked ~ .nav-list {
height: 100vh;
}
#check:checked ~ .nav-list li {
opacity: 1;
}
#media only screen and (min-width: 1100px) {
nav{
height: 100px;
background-color: transparent;
}
.hamburger-btn{
display: none;
}
.nav-list {
position: relative;
height: 100px;
top: 0;
background: none;
float: right;
text-align: right;
margin-right: 25px;
transition: none;
text-shadow: 2px 2px 3px #00b1f7;
}
.nav-list li a {
color: rgb(0, 0, 0);
font-size: 27.5px;
text-transform: uppercase;
text-decoration: none;
font-weight: 900;
}
.nav-list li{
display: inline-block;
opacity: 1;
line-height: 100px;
margin: 0 20px;
transition: none;
}
.nav-list li a.active, .nav-list li a:hover {
color: #00b1f7;
text-shadow: 1px 1px #000000;
}
.logo-txt {
font-size: 35px;
line-height: 75px;
padding-left: 30px;
font-family: 'Signika Negative', sans-serif;
font-weight: bold;
color: rgb(0, 0, 0);
cursor: pointer;
}
}
<header>
<nav>
<div class="logo-container">
<label class="logo-txt">Autirock</label>
</div>
<input type="checkbox" id="check">
<label for="check" class="hamburger-btn">
<i class="fas fa-bars"></i>
</label>
<ul class="nav-list">
<li><a class="active" href="#banner">DOMŮ</a></li>
<li>SLUŽBY A POMŮCKY</li>
<li>O MNĚ</li>
<li>CENÍK</li>
<li>KONTAKT</li>
</ul>
</nav>
</header>

That's a nice idea for hamburger menu. But you will need javascript to close it when clicking on a link. That's what I did. It is operated using a checkbox, so I unchecked it.
document.querySelectorAll(".nav-list li a").forEach(function(elem) {
elem.addEventListener('click', function(ev) {
document.getElementById("check").checked = false;
});
})
nav {
height: 75px;
width: 100%;
background-color: #171c1f;
display: flex;
justify-content: space-between;
z-index: 99;
}
.logo-container {
display: flex;
align-items: center;
width: auto;
margin: 0;
}
.logo-txt {
font-size: 35px;
line-height: 75px;
padding-left: 30px;
font-family: 'Signika Negative', sans-serif;
font-weight: bold;
color: rgb(255, 255, 255);
cursor: pointer;
}
.nav-list {
position: fixed;
width: 100%;
height: 0vh;
top: 75px;
background: #4a499e;
float: right;
text-align: center;
transition: all .5s;
z-index: 2;
}
.nav-list li {
opacity: 0;
line-height: 30px;
margin: 50px 0;
transition: all .5s;
}
.nav-list li a {
color: #fff;
font-size: 27.5px;
text-transform: uppercase;
text-decoration: none;
font-weight: 900;
transition: .5s;
}
.nav-list li a.active,
.nav-list li a:hover {
color: #00b1f7;
transition: 0.5s;
}
.hamburger-btn {
display: block;
font-size: 30px;
color: white;
float: right;
line-height: 75px;
margin-right: 40px;
cursor: pointer;
}
#check {
display: none;
}
#check:checked~.nav-list {
height: 100vh;
}
#check:checked~.nav-list li {
opacity: 1;
}
#media only screen and (min-width: 1100px) {
nav {
height: 100px;
background-color: transparent;
}
.hamburger-btn {
display: none;
}
.nav-list {
position: relative;
height: 100px;
top: 0;
background: none;
float: right;
text-align: right;
margin-right: 25px;
transition: none;
text-shadow: 2px 2px 3px #00b1f7;
}
.nav-list li a {
color: rgb(0, 0, 0);
font-size: 27.5px;
text-transform: uppercase;
text-decoration: none;
font-weight: 900;
}
.nav-list li {
display: inline-block;
opacity: 1;
line-height: 100px;
margin: 0 20px;
transition: none;
}
.nav-list li a.active,
.nav-list li a:hover {
color: #00b1f7;
text-shadow: 1px 1px #000000;
}
.logo-txt {
font-size: 35px;
line-height: 75px;
padding-left: 30px;
font-family: 'Signika Negative', sans-serif;
font-weight: bold;
color: rgb(0, 0, 0);
cursor: pointer;
}
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css" integrity="sha512-1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSLy85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" referrerpolicy="no-referrer"
/>
<header>
<nav>
<div class="logo-container">
<label class="logo-txt">Autirock</label>
</div>
<input type="checkbox" id="check">
<label for="check" class="hamburger-btn">
<i class="fas fa-bars"></i>
</label>
<ul class="nav-list">
<li><a class="active" href="#banner">DOMŮ</a></li>
<li>SLUŽBY A POMŮCKY</li>
<li>O MNĚ</li>
<li>CENÍK</li>
<li>KONTAKT</li>
</ul>
</nav>
</header>

Related

Include animation on nav's drop downdown menu

I would like to implement an animation when the dropdown menu is triggered once clicked on the hamburger icon (only appears on mobile and tablet). By now it only appears and disappears when clicked, but I would like it to have a drop animation. Which would be the best way to do this avoiding js and just using css, if possible?
body {
background-color: #111111 !important;
font-family: 'Fredoka', sans-serif;
}
a {
color: #dad7d7;
text-decoration: none;
transition: 0.3s;
}
.botoncopyright,
.botoncopyright:hover {
color: #ccd1d1;
}
footer {
background-color: #232323;
}
.cookie-container {
background-color: #232323;
color: #dad7d7;
}
.cookie-container a {
color: #dad7d7;
}
.cookie-container a:hover {
color: #ffffff;
}
html {
scroll-behavior: smooth;
}
main {
min-height: 100vh;
display: grid;
grid-template-rows: auto 1fr auto;
gap: 2vw;
}
a {
color: #dad7d7;
text-decoration: none;
transition: 0.3s;
}
nav {
z-index: 1;
background-color: rgba(35, 35, 35, 0.9);
backdrop-filter: saturate(180%) blur(20px);
padding: 0 15px;
position: sticky;
top: 0;
}
.botoncopyright,
.botoncopyright:hover {
color: #ccd1d1;
text-decoration: none;
cursor: default;
}
footer {
background-color: #232323;
}
.cookie-container {
position: fixed;
top: auto;
right: 0;
bottom: 0;
left: 0;
z-index: 2;
background-color: #363636;
color: #dad7d7;
text-align: center;
padding: 10px 32px;
transform: translateY(100%);
transition: transform 400ms ease-in-out;
}
.cookie-container.active {
transform: translateY(0);
}
.cookie-container p {
padding-top: 10px;
}
.cookie-container a {
text-decoration: none !important;
color: #dad7d7;
display: flex;
justify-content: center;
align-items: center;
}
.cookie-container a:hover {
color: #ffffff;
}
.cookie-btn {
background-color: #add8e6;
border: none;
margin-top: 20px;
width: 28%;
color: #232323 !important;
transition: 0.3s;
cursor: pointer;
border-radius: 4px 4px 4px 4px;
margin-bottom: 10px;
}
.cookie-btn:hover {
background-color: #a6daeb;
width: 30%;
transition: 0.3s;
}
footer .btn svg {
transition: 0.3s;
}
.rsyoutube {
fill: #8b8d90;
}
.rsyoutube:hover {
fill: #ff0000;
}
.rstwitter {
fill: #8b8d90;
}
.rstwitter:hover {
fill: #00acee;
}
.rsinstagram {
fill: #8b8d90;
}
.rsinstagram:hover {
fill: #de1b85;
}
.rstelegram {
fill: #8b8d90;
}
.rstelegram:hover {
fill: #229ed9;
}
.rsdiscord {
fill: #8b8d90;
}
.rsdiscord:hover {
fill: #5865f2;
}
df-messenger {
--df-messenger-bot-message: #e1f2f7;
--df-messenger-button-titlebar-color: #add8e6;
--df-messenger-button-titlebar-font-color: #757575;
--df-messenger-chat-background-color: #232323;
--df-messenger-font-color: #232323;
--df-messenger-send-icon: #add8e6;
--df-messenger-user-message: #add8e6;
}
df-messenger:hover {
--df-messenger-button-titlebar-color: #a6daeb;
}
.content {
margin: auto;
max-width: 2200px;
width: 96vw;
}
.contact-wrapper {
background: transparent;
width: 100%;
height: auto;
}
.contact-wrapper h1,
.contact-wrapper h2 {
margin: 1.8em 0 47px 0;
font-weight: 400;
text-transform: uppercase;
color: #d2d2d2;
letter-spacing: 0.2em;
}
.contact-wrapper h1 {
font-size: 20px;
text-align: center;
}
.contact-wrapper h2 {
font-size: 18px;
text-align: left;
}
.contact-wrapper p {
color: #d2d2d2;
text-align: justify;
}
.contact-wrapper > * {
padding: 1em;
}
.contact-form {
background: linear-gradient(225deg, transparent 30px, #212121 0) top left;
background-size: 100% 100%;
background-repeat: no-repeat;
width: 100%;
height: auto;
}
.contact-form h2 {
margin: 10px 0 30px 0;
font-size: 18px;
padding-top: 2.5em;
text-align: center;
font-weight: 400;
text-transform: uppercase;
color: #d2d2d2;
letter-spacing: 0.2em;
}
.contact-form form p{
color: #d2d2d2;
margin: 0;
text-align: center;
padding: 1em;
}
.contact-form form button,
.contact-form form input,
.contact-form form textarea {
width: 90%;
padding: 0.7em;
border: none;
background: none;
outline: none;
resize: none;
color: #d2d2d2;
border-bottom: 1px solid #add8e6;
}
.contact-form form button {
padding: none;
width: 53%;
background: #add8e6;
border: 0;
transition: 0.1s;
border-radius: 8px;
color: #3b3b3b;
}
.contact-form form button:hover,
.contact-form form button:focus {
background: #a6daeb;
padding: none;
width: 57%;
border: 0;
transition: 0.1s;
border-radius: 8px;
color: #3b3b3b;
}
.contact-info {
background: linear-gradient(-315deg, transparent 30px, #a7d1de 0) bottom left;
background-size: 100% 100%;
background-repeat: no-repeat;
height: auto;
}
.contact-info h3 {
margin: 0 0 37px 38px;
font-size: 14px;
padding-top: 2em;
text-align: center;
padding-right: 27px;
font-weight: 400;
text-transform: uppercase;
color: #232323;
letter-spacing: 0.2em;
}
#clients .client-logo {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
border: none;
overflow: hidden;
background: none;
height: 120px;
}
#clients img {
transition: all 0.4s ease-in-out;
}
.contact-info p {
text-align: center;
margin: 1.5rem 0 1rem 0;
color: #696969;
}
.btn:focus {
outline: none !important;
box-shadow: none !important;
}
.toggle a {
color: #dad7d7;
}
.toggle a:hover {
color: #ffffff;
}
.menu,
.submenu {
list-style-type: none;
}
.logo {
padding: 7.5px 0 7.5px 0;
}
.botonlogo {
max-width: 56px;
}
.item {
padding: 10px;
}
.item.button {
padding: 9px 5px;
}
.item:not(.button) a:hover,
.item a:hover::after {
color: #ffffff;
transition: 0.3s;
}
.menu {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
width: 100%;
}
.menu li a {
display: block;
padding: 15px 5px;
}
.menu li.subitem a {
padding-right: -15px;
padding-left: 15px;
padding-top: 35px;
width: 100%;
}
.toggle {
order: 1;
font-size: 20px;
}
.item.button {
order: 2;
}
.item {
order: 3;
width: 100%;
text-align: center;
display: none;
}
.active .item {
display: block;
}
.button.secondary {
border-bottom: 1px solid #dad7d7;
}
.submenu {
display: none;
}
.submenu-active .submenu {
display: block;
}
.has-submenu>a::after {
font-family: 'Font Awesome 5 Free';
font-size: 16px;
line-height: 16px;
content: '\f024';
color: #dad7d7;
padding-left: 11px;
}
.subitem a {
padding: 10px 15px;
}
.submenu-active {
border-radius: 0;
background-color: #363636;
width: 100%;
border-radius: 5px 5px 0px 0px;
}
li.has-submenu a {
color: #dad7d7 !important;
transition: 0.3s;
padding-bottom: 12px;
cursor: pointer;
}
li.has-submenu a:hover {
color: #ffffff !important;
transition: 0.3s;
cursor: pointer;
}
li.subitem a {
padding-left: 0%;
padding-right: 53px !important;
width: 100%;
}
/* Mediaqueries tablet */
#media all and (min-width: 700px) {
.cookie-btn {
background-color: #add8e6;
border: none;
margin-top: 20px;
width: 13%;
color: #232323 !important;
transition: 0.3s;
cursor: pointer;
border-radius: 4px 4px 4px 4px;
margin-bottom: 10px;
}
.cookie-btn:hover {
background-color: #a6daeb;
width: 18%;
transition: 0.3s;
}
.content {
margin-left: auto;
margin-right: auto;
max-width: 2200px;
width: 96vw;
}
.contact-wrapper {
background: transparent;
width: 100%;
height: auto;
}
.contact-wrapper h1,
.contact-wrapper h2 {
margin: 1.8em 0 47px 0;
font-weight: 400;
text-transform: uppercase;
color: #d2d2d2;
letter-spacing: 0.2em;
}
.contact-wrapper h1 {
font-size: 20px;
text-align: center;
}
.contact-wrapper h2 {
font-size: 18px;
text-align: left;
}
.contact-wrapper p {
color: #d2d2d2;
text-align: justify;
}
.contact-wrapper > * {
padding: 1em;
}
.contact-form {
background: linear-gradient(225deg, transparent 30px, #212121 0) top left;
background-size: 100% 100%;
background-repeat: no-repeat;
width: 100%;
height: auto;
}
.contact-form h2 {
margin: 10px 0 30px 0;
font-size: 18px;
padding-top: 2.5em;
text-align: center;
font-weight: 400;
text-transform: uppercase;
color: #d2d2d2;
letter-spacing: 0.2em;
}
.contact-form form p{
color: #d2d2d2;
margin: 0;
text-align: center;
padding: 1em;
padding-top: 7.1%;
}
.contact-form form button,
.contact-form form input,
.contact-form form textarea {
width: 90%;
padding: 0.7em;
border: none;
background: none;
outline: none;
resize: none;
color: #d2d2d2;
border-bottom: 1px solid #add8e6;
}
.contact-form form button {
padding: none;
width: 34%;
background: #add8e6;
border: 0;
transition: 0.1s;
border-radius: 8px;
color: #3b3b3b;
}
.contact-form form button:hover,
.contact-form form button:focus {
background: #a6daeb;
padding: none;
width: 38%;
border: 0;
transition: 0.1s;
border-radius: 8px;
color: #3b3b3b;
}
.contact-info {
background: linear-gradient(-315deg, transparent 30px, #a7d1de 0) bottom left;
background-size: 100% 100%;
background-repeat: no-repeat;
height: auto;
}
.contact-info h3 {
margin: 0 0 37px 38px;
font-size: 14px;
padding-top: 5em;
text-align: center;
padding-right: 27px;
font-weight: 400;
text-transform: uppercase;
color: #232323;
letter-spacing: 0.2em;
}
#clients .client-logo {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
border: none;
overflow: hidden;
background: none;
height: 120px;
}
#clients img {
transition: all 0.4s ease-in-out;
}
.contact-info p {
text-align: center;
margin: 5rem 0 1rem 0;
width: 90%;
margin-right: auto;
margin-left: auto;
color: #696969;
}
.btn:focus {
outline: none !important;
box-shadow: none !important;
}
.menu {
justify-content: center;
width: 100%;
}
.logo {
flex: 1;
}
.item.button {
width: auto;
order: 1;
display: block;
}
.toggle {
flex: 1;
text-align: right;
order: 2;
}
.menu li.button a {
padding: 10px 15px;
margin: 5px 0;
}
.button a {
background-color: #add8e6;
color: #232323;
border: 1.5px solid #add8e6;
border-radius: 4px 4px 4px 4px;
transition: 0.8s;
}
.button.secondary {
border: 0;
}
.button.secondary a {
background-color: #add8e6;
border: 1.5px solid #add8e6;
transition: 0.8s;
}
.button a:hover {
background-color: #a6daeb;
text-decoration: none;
color: #474747;
transition: 0.8s;
}
.button:not(.secondary) a:hover {
border: 1.5px solid #a6daeb;
transition: 0.8s;
}
}
/* Mediaqueries desktop */
#media all and (min-width: 960px) {
.cookie-btn {
background-color: #add8e6;
border: none;
margin-top: 20px;
width: 10%;
color: #232323 !important;
transition: 0.3s;
cursor: pointer;
border-radius: 4px 4px 4px 4px;
margin-bottom: 10px;
}
.cookie-btn:hover {
background-color: #a6daeb;
width: 11%;
transition: 0.3s;
}
.content {
margin: auto;
margin-left: auto;
margin-right: auto;
max-width: 2200px;
width: 96vw;
}
.contact-wrapper {
background: transparent;
width: 100%;
height: auto;
display: grid;
grid-template-columns: 2fr 1fr;
}
.contact-wrapper h1,
.contact-wrapper h2 {
margin: 1.8em 0 47px 0;
font-weight: 400;
text-transform: uppercase;
color: #d2d2d2;
letter-spacing: 0.2em;
}
.contact-wrapper h1 {
font-size: 20px;
text-align: center;
}
.contact-wrapper h2 {
font-size: 18px;
text-align: left;
}
.contact-wrapper p {
color: #d2d2d2;
text-align: justify;
padding-top: 10%;
}
.contact-wrapper > * {
padding: 1em;
}
.contact-form {
background: linear-gradient(-315deg, transparent 45px, #212121 0) bottom left;
background-size: 100% 100%;
background-repeat: no-repeat;
width: 100%;
height: auto;
}
.contact-form h2 {
margin: 10px 0 30px 0;
font-size: 18px;
padding-top: 2.5em;
text-align: center;
font-weight: 400;
text-transform: uppercase;
color: #d2d2d2;
letter-spacing: 0.2em;
}
.contact-form form p{
color: #d2d2d2;
margin: 0;
text-align: center;
padding: 1em;
padding-top: 7%;
}
.contact-form form button,
.contact-form form input,
.contact-form form textarea {
width: 90%;
padding: 0.7em;
border: none;
background: none;
outline: none;
resize: none;
color: #d2d2d2;
border-bottom: 1px solid #add8e6;
}
.contact-form form button {
padding: none;
width: 40%;
background: #add8e6;
border: 0;
transition: 0.2s;
border-radius: 8px;
color: #3b3b3b;
margin-bottom: 6%;
}
.contact-form form button:hover,
.contact-form form button:focus {
background: #a6daeb;
padding: none;
width: 44%;
border: 0;
transition: 0.2s;
border-radius: 8px;
color: #3b3b3b;
}
.contact-info {
background: linear-gradient(225deg, transparent 45px, #a7d1de 0) top left;
background-size: 100% 100%;
background-repeat: no-repeat;
height: auto;
}
.contact-info h3 {
margin: 0 0 37px 38px;
font-size: 14px;
padding-top: 25%;
text-align: center;
padding-right: 27px;
font-weight: 400;
text-transform: uppercase;
color: #232323;
letter-spacing: 0.2em;
}
#clients .client-logo {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
border: none;
overflow: hidden;
background: none;
height: 120px;
}
#clients img {
transition: all 0.4s ease-in-out;
}
.contact-info p {
text-align: center;
margin: 2rem 0 1rem 0;
width: 86%;
margin-right: auto;
margin-left: auto;
color: #696969;
}
.item {
order: 1;
position: relative;
display: block;
width: auto;
}
.button {
order: 2;
}
.submenu-active .submenu {
display: block;
position: absolute;
left: 0;
top: 68px;
background-color: #363636;
border-radius: 0px 0px 5px 5px;
}
.toggle {
display: none;
}
.boton {
background-color: #add8e6;
border: none;
color: #585858 !important;
}
.boton:hover {
background-color: #a6daeb;
border: none;
color: #585858 !important;
}
}
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width-device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="img/favicon.ico" /><title>Mixi</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="https://www.gstatic.com/dialogflow-console/fast/messenger/bootstrap.js?v=1"></script>
<df-messenger chat-title="Mixi" agent-id="41fe496c-6e3a-4316-aa5a-05dae8cd911d" language-code="es"></df-messenger>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-229317979-1"></script>
<script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-229317979-1');</script>
<script src="https://kit.fontawesome.com/d48f664aec.js" crossorigin="anonymous"></script>
<script src="js/main.js"></script>
<link rel="preload" href="css/index.css" as="style">
<link rel="stylesheet" type="text/css" href="css/index.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fredoka:wght#300&display=swap" rel="stylesheet">
</head>
<body>
<nav>
<ul class="menu">
<li class="logo"><a class="botonlogo" href="https://www.mixi.es"><svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"width="50px" height="50px" viewBox="0 0 99 99" enable-background="new 0 0 99 99" xml:space="preserve"><path fill="#ACD7E4" d="M85.95,98.88H12.37c-6.78,0-12.28-5.5-12.28-12.28V13.02c0-6.78,5.5-12.28,12.28-12.28h73.58c6.78,0,12.28,5.5,12.28,12.28V86.6C98.23,93.38,92.73,98.88,85.95,98.88z"/><g><g><g><path fill="#1D1D1B" d="M7.96,66.3c-0.68,0-1.17-0.11-1.49-0.32s-0.53-0.5-0.64-0.85c-0.11-0.35-0.16-0.78-0.16-1.28v-21.1c0-0.46,0.05-0.86,0.16-1.2c0.11-0.34,0.33-0.59,0.67-0.77s0.84-0.27,1.52-0.27c0.78,0,1.34,0.15,1.68,0.45c0.34,0.3,0.51,0.83,0.51,1.57l-0.21,2.29c0.25-0.53,0.62-1.07,1.12-1.6c0.5-0.53,1.09-1.01,1.79-1.44c0.69-0.43,1.43-0.76,2.21-1.01c0.78-0.25,1.58-0.37,2.4-0.37c1.24,0,2.35,0.22,3.33,0.67c0.98,0.44,1.86,1.07,2.64,1.89c0.78,0.82,1.44,1.83,1.97,3.04c0.71-1.17,1.46-2.17,2.26-3.01c0.8-0.83,1.71-1.47,2.72-1.92c1.01-0.44,2.16-0.67,3.44-0.67c2.06,0,3.77,0.51,5.14,1.52c1.37,1.01,2.4,2.43,3.09,4.26c0.69,1.83,1.04,4.02,1.04,6.58v11.13c0,0.5-0.05,0.92-0.16,1.28c-0.11,0.36-0.32,0.63-0.64,0.83s-0.83,0.29-1.54,0.29c-0.67,0-1.19-0.11-1.54-0.32c-0.36-0.21-0.58-0.5-0.67-0.85c-0.09-0.35-0.13-0.78-0.13-1.28V52.72c0-1.56-0.2-2.93-0.59-4.1c-0.39-1.17-0.96-2.08-1.71-2.72c-0.75-0.64-1.72-0.96-2.93-0.96c-1.28,0-2.41,0.32-3.38,0.96c-0.98,0.64-1.73,1.54-2.26,2.69s-0.8,2.53-0.8,4.13v11.24c0,0.53-0.11,1-0.32,1.39c-0.21,0.39-0.53,0.67-0.96,0.83c-0.43,0.16-0.96,0.19-1.6,0.08c-0.53-0.04-0.94-0.17-1.23-0.4s-0.46-0.51-0.53-0.85c-0.07-0.34-0.11-0.72-0.11-1.15V52.72c0-1.56-0.19-2.93-0.56-4.1s-0.94-2.08-1.71-2.72c-0.76-0.64-1.75-0.96-2.96-0.96c-1.28,0-2.41,0.33-3.38,0.99c-0.98,0.66-1.73,1.57-2.26,2.74c-0.53,1.17-0.8,2.52-0.8,4.05v11.19c0,0.5-0.05,0.92-0.16,1.28c-0.11,0.36-0.33,0.63-0.67,0.83C9.2,66.2,8.67,66.3,7.96,66.3z"/><path fill="#1D1D1B" d="M52.23,34.12c-0.78,0-1.37-0.12-1.76-0.35c-0.39-0.23-0.65-0.56-0.77-0.99c-0.12-0.43-0.19-0.92-0.19-1.49c0-0.57,0.06-1.06,0.19-1.46c0.12-0.41,0.39-0.71,0.8-0.91c0.41-0.2,1-0.29,1.78-0.29c0.75,0,1.31,0.11,1.71,0.32s0.65,0.53,0.77,0.96c0.12,0.43,0.19,0.94,0.19,1.54c0,0.53-0.06,1-0.19,1.41c-0.12,0.41-0.38,0.72-0.77,0.93C53.6,34.02,53.01,34.12,52.23,34.12z M52.23,66.3c-0.67,0-1.19-0.1-1.54-0.29c-0.36-0.2-0.58-0.47-0.67-0.83c-0.09-0.35-0.13-0.78-0.13-1.28V42.86c0-0.46,0.05-0.88,0.16-1.25s0.33-0.65,0.67-0.83c0.34-0.18,0.86-0.27,1.57-0.27c0.67,0,1.17,0.1,1.49,0.29c0.32,0.2,0.53,0.48,0.64,0.85c0.11,0.37,0.16,0.81,0.16,1.3v20.99c0,0.5-0.05,0.92-0.16,1.28c-0.11,0.36-0.33,0.62-0.67,0.8C53.42,66.21,52.91,66.3,52.23,66.3z"/></g></g><g><path fill="#1D1D1B" d="M65.03,57.61l-4.59,5c-0.52,0.57-0.88,1.05-1.08,1.43c-0.2,0.39-0.2,0.75,0,1.09c0.2,0.34,0.56,0.7,1.08,1.09c0.52,0.35,0.97,0.59,1.35,0.72c0.38,0.12,0.77,0.08,1.17-0.13c0.4-0.21,0.86-0.58,1.38-1.12l7.42-8.08H65.03z"/><path fill="#1D1D1B" d="M84.36,64.04c-0.18-0.39-0.55-0.87-1.11-1.43l-8.04-8.76l8.1-8.83c0.56-0.57,0.92-1.05,1.08-1.43c0.16-0.39,0.14-0.75-0.06-1.09c-0.2-0.34-0.58-0.72-1.14-1.14c-0.76-0.57-1.38-0.81-1.86-0.72c-0.48,0.09-1.12,0.52-1.92,1.3l-7.56,8.24l-7.56-8.24c-0.48-0.53-0.9-0.9-1.26-1.12c-0.36-0.21-0.73-0.27-1.11-0.16c-0.38,0.11-0.83,0.34-1.35,0.69c-0.6,0.39-1,0.75-1.2,1.09c-0.2,0.34-0.21,0.71-0.03,1.12c0.18,0.41,0.53,0.89,1.05,1.46l8.1,8.83l-0.01,0.01l3.37,3.67l0.01-0.01l7.5,8.18c0.56,0.53,1.04,0.9,1.44,1.12c0.4,0.21,0.79,0.26,1.17,0.13c0.38-0.12,0.81-0.36,1.29-0.72c0.56-0.39,0.93-0.75,1.11-1.09C84.54,64.79,84.54,64.43,84.36,64.04z"/></g><g><g><path fill="#1D1D1B" d="M90.03,34.55c-0.78,0-1.37-0.11-1.76-0.35c-0.39-0.23-0.65-0.56-0.77-0.99c-0.12-0.43-0.19-0.92-0.19-1.49c0-0.57,0.06-1.06,0.19-1.47c0.12-0.41,0.39-0.71,0.8-0.91c0.41-0.19,1-0.29,1.79-0.29c0.75,0,1.31,0.11,1.7,0.32c0.39,0.21,0.65,0.53,0.77,0.96s0.19,0.94,0.19,1.54c0,0.53-0.06,1-0.19,1.41c-0.12,0.41-0.38,0.72-0.77,0.93C91.4,34.44,90.81,34.55,90.03,34.55z M90.03,66.72c-0.67,0-1.19-0.1-1.54-0.29c-0.36-0.2-0.58-0.47-0.67-0.83c-0.09-0.35-0.13-0.78-0.13-1.28V43.28c0-0.46,0.05-0.88,0.16-1.25c0.11-0.37,0.33-0.65,0.67-0.83s0.86-0.27,1.57-0.27c0.67,0,1.17,0.1,1.49,0.29c0.32,0.2,0.53,0.48,0.64,0.85s0.16,0.81,0.16,1.31v20.99c0,0.5-0.05,0.92-0.16,1.28c-0.11,0.36-0.33,0.62-0.67,0.8C91.21,66.63,90.71,66.72,90.03,66.72z"/></g></g></g></svg></a></li>
<li class="item">Tienda</li>
<li class="item">Calculadora</li>
<li class="item">Noticias</li>
<li class="item">Contacto</li>
<li class="item has-submenu">
<a tabindex="0">Idioma: ES</a>
<ul class="submenu">
<li class="subitem">English</li>
</ul>
</li>
<li class="toggle"><i class="fas fa-bars"></i></li>
<script src="js/toggle.js"></script>
</ul>
</nav>
<br>
<br>
<br>
<br>
<br>
<br>
<script src="js/utilidades.js"></script>
<footer class="text-center text-white">
<div class="text-center text-dark p-3" style="background-color: rgba(0, 0, 0, 0.2);">
<a class="botoncopyright">Mixi © | 2022</a>
</div>
</footer>
<script src="js/toggle.js"></script>
</body>
</html>
Have you tried to add transition to the nav?
If not try
Nav{transition:easy-in-out all 0.5s}

My dropdown menu is not showing upon hover

I'm having trouble making a dropdown menu. My dropdown menu just won't show upon hover, but if I change my display from none to block in .submenu ul li, the dropdown is in the right place.
Can anyone please help me?
* {
padding: 0;
margin: 0;
text-decoration: none;
list-style: none;
box-sizing: border-box;
}
body {
font-family: 'montserrat';
}
.container {
height: 80px;
width: 100%;
background: #34495e;
display: block;
float: right;
}
h1.logo {
font-size: 35px;
font-weight: bold;
color: white;
padding: 0 40px;
line-height: 80px;
float: left;
width: auto;
/* border: 1px red solid; */
}
.logo span {
color: #3498db;
}
nav ul {
float: right;
margin-right: 40px;
/* border: 1px red solid; */
}
nav li {
display: inline-block;
margin: 0 5px;
line-height: 80px;
text-align: center;
/* border: 1px red solid; */
}
nav a {
color: white;
font-size: 18px;
text-transform: uppercase;
padding: 7px 10px;
border-radius: 3px;
}
a.active,
a:hover {
border: 1px solid white;
transition: .5s ease-in;
}
nav #icon {
color: white;
font-size: 30px;
line-height: 80px;
float: right;
margin-right: 40px;
cursor: pointer;
background: #34495e;
border: none;
}
#media (min-width: 980px) {
h1.logo {
font-size: 32px;
padding-left: 60px;
}
nav ul {
margin-right: 20px;
}
nav a {
font-size: 17px;
}
nav #icon {
display: none;
}
div button {
display: none;
}
}
#media(max-width:980px) {
nav #icon {
display: block;
}
nav ul {
position: fixed;
width: 100%;
height: 100vh;
background: #2f3640;
top: 80px;
left: -100%;
text-align: center;
transition: all .5s ease-in;
}
.submenu ul {
top: 100%;
}
nav li {
display: block;
margin: 50px 0;
line-height: 30px;
}
nav a {
font-size: 20px;
text-align: center;
}
a.active,
a:hover {
border: none;
color: #3498db;
}
#btn1:hover {
border: none;
color: #3498db;
}
#btn2:hover {
border: none;
color: #3498db;
}
#btn3:hover {
border: none;
color: #3498db;
}
nav ul.show {
left: 0;
}
}
body {
background-image: url('../images/workout.jpg');
background-size: cover;
height: calc(100vh-80px);
}
div .connect {
background: #2f364e;
display: inline-block;
width: auto;
height: auto;
}
#btn1 {
background: #2f364e;
padding: .5em .7em;
border: none;
font-size: 20px;
color: white;
margin: 0 5px;
}
#btn2 {
background: #2f364e;
padding: .5em .7em;
border: none;
font-size: 20px;
color: white;
margin: 0 5px;
}
#btn3 {
background: #2f364e;
color: white;
padding: .5em .7em;
border: none;
font-size: 20px;
margin: 0 5px;
}
.submenu ul li {
display: none;
background: #34495e;
border-radius: 6px;
padding: 0 2px;
text-align: center;
opacity: 0.9;
transition: .5s ease-in;
}
.submenu ul {
margin: 0;
padding: 0;
}
.submenu li a {
margin: 0;
padding: .5em;
}
.main-nav li :hover .submenu {
display: block;
}
<header>
<nav class="container">
<h1 class="logo">Fitness Fir<span>st</span></h1>
<nav class="navbar">
<div class="main-nav">
<ul>
<li><a class="active" href="#">Home</a></li>
<li>About</li>
<li>Services
<div class="submenu">
<ul>
<li>Membership</li>
<li>Coaching</li>
</ul>
</div>
</li>
<li>Timetables</li>
<li>Contact</li>
<div class="connect" class="button">
<button id="btn1"><i class="fa fa-facebook"></i></button>
<button id="btn2"><i class="fa fa-instagram"></i></button>
<button id="btn3"><i class="fa fa-twitter"></i></button>
</div>
</ul>
<button id="icon"><i class="fa fa-bars" style="font-size:36px"></i></button>
</div>
</nav>
</nav>
</header>
Issue
In your CSS file, you have only hidden the li elements in your submenu:
.submenu ul li {
display: none;
background: #34495e;
border-radius: 6px;
padding: 0 2px;
text-align: center;
opacity: 0.9;
transition: .5s ease-in;
}
But here, you're trying to display the .submenu class, rather than the lis inside. In addition, the :hover selector is not attached to the li
.main-nav li :hover .submenu {
display: block;
}
Fix
To fix this we can change the above selector to the below, so that it is now un-hiding the submenu's lis, when you hover over the parent li (Services button)
.main-nav li:hover .submenu li {
display: block;
}

Div moves over other one on diferent device scales

So I have this problem, I have Static web page, and i have header section and few others.
But currently right now. Whatever section i set to be under the header section, its just move over the header.
This is first time this is happening, and i cant reslove it.
On first i tought its problem in browser, but it is same on every one that i tried.
I think it is problem in the image on header section so i placed it above the txt section on the header, but section below header stil overlaps on the header.
Soo I double checked all code on header and I think there was nothing wrong that
could cause this.
header {
margin: auto;
height: 100vh;
}
.navigation-menu {
z-index: 10000;
display: flex;
align-items: center;
background: #fff;
box-shadow: 0 1px 1px #333;
justify-content: space-between;
position: fixed;
width: 100%;
left: 0;
top: 0;
padding: 20px 20px;
}
.navigation-menu nav ul {
word-spacing: 10px;
}
.navigation-menu nav ul li {
list-style-type: none;
display: inline-block;
}
.navigation-menu nav ul li a {
font-size: 19px;
}
/*
===== Hamburger Menu =====
*/
.navigation-menu .hamburger {
padding: 5px;
position: relative;
display: none;
cursor: pointer;
right: 40px;
border: none;
background: none;
outline: none;
appearance: none;
}
.navigation-menu .hamburger .bar {
transition: .3s ease all;
position: relative;
display: block;
margin-bottom: 5px;
width: 30px;
height: 3px;
background: #333;
border-radius: 26px;
}
.hamburger.is-active .bar:nth-last-child(1) {
transform: rotate(-45deg) translate(4px, -5px);
}
.hamburger.is-active .bar:nth-last-child(2) {
transform: translateX(-10px);
opacity: 0;
}
.hamburger.is-active .bar:nth-last-child(3) {
transform: rotate(45deg) translate(6px, 8px);
}
.mobile-menu {
transition: .3s ease all;
transform: translateX(100%);
position: fixed;
display: none;
align-items: center;
justify-content: space-around;
left: 0;
top: 0;
width: 100%;
padding-top: 120px;
height: 100vh;
z-index: 2;
background: #fff;
}
.mobile-menu.menu-show {
transform: translateX(0%);
}
.mobile-menu ul {
word-spacing: 10px;
}
.mobile-menu ul li {
list-style-type: none;
}
.mobile-menu ul li a {
font-family: 'Playfair Display', serif;
margin-bottom: 5px;
transition: .3s ease all;
font-size: 45px;
}
.mobile-menu ul li a:hover {
color: red;
}
#media (max-width:533px) {
.navigation-menu nav {
display: none;
}
.navigation-menu .hamburger {
display: block;
}
.mobile-menu {
display: flex;
}
}
/*
===== Hamburger Menu =====
*/
.heading__container {
position: relative;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
height: 100vh;
}
.heading__content {
position: relative;
margin: 6%;
display: block;
}
.heading__title h1{
font-weight: 900;
text-transform: uppercase;
font-size: 55px;
}
.heading__title h1 span {
color: red;
}
.heading__subtitle p{
font-size: 22px;
}
.heading__subtitle {
max-width: 600px;
width: 100%;
}
.heading__image {
padding: 1em;
position: relative;
text-align: center;
}
.heading__image img {
max-width: 400px;
width: 100%;
}
.heading__button-box .btn__read {
background: red;
border: solid 1px red;
}
.heading__button-box .btn__read a {
color: #fff;
}
.heading__button-box .btn__react {
position: relative;
}
.heading__button-box .btn__react::before {
position: absolute;
content: '';
left: 0;
bottom: 0;
background: red;
z-index: -1;
height: 0;
transition: .3s ease all;
width: 100%;
}
.heading__button-box .btn__react:hover::before {
height: 100%;
}
.heading__button-box button {
margin-bottom: 1%;
margin-right: 5%;
}
.heading__button-box .btn__react a {
transition: .3s ease all;
}
.heading__button-box .btn__react:hover {
border: solid 1px red;
}
.heading__button-box .btn__react:hover a {
color: #fff;
}
.heading__button-box .btn__react {
border: solid 1px red;
}
.h__wrapper {
margin-top: 50px;
}
.h__wrapper .h__button {
display: inline-block;
overflow: hidden;
height: 60px;
width: 60px;
float: left;
border-radius: 50px;
cursor: pointer;
margin: 10px 5px;
transition: .3s ease all;
box-shadow: 0 2px 12px #333;
}
.h__wrapper .h__button:hover {
width: 200px;
}
.h__wrapper .h__button .icon {
height: 60px;
width: 60px;
transition: .3s ease all;
border-radius: 50px;
text-align: center;
line-height: 60px;
box-sizing: border-box;
display: inline-block;
}
.h__wrapper .h__button .icon i {
font-size: 25px;
line-height: 60px;
}
.h__wrapper .h__button span {
font-size: 20px;
line-height: 60px;
margin-left: 10px;
font-weight: 500;
}
.h__wrapper .h__button:nth-child(1) .icon {
background: #fff;
}
.h__wrapper .h__button:nth-child(1):hover .icon {
background: rgb(126, 168, 245);
}
.h__wrapper .h__button:nth-child(1):hover .icon i{
color: #fff;
}
.h__wrapper .h__button:nth-child(2) .icon {
background: #fff;
}
.h__wrapper .h__button:nth-child(2):hover .icon {
background: rgb(214, 146, 20);
}
.h__wrapper .h__button:nth-child(2):hover .icon i{
color: #fff;
}
.h__wrapper .h__button:nth-child(3) .icon {
background: #fff;
}
.h__wrapper .h__button:nth-child(3):hover .icon {
background: #333;
}
.h__wrapper .h__button:nth-child(3):hover .icon i{
color: #fff;
}
<header>
<div class="navigation-menu">
<img src="../assets/images/logo/Anima.png" alt="">
<nav>
<ul>
<li>Home</li>
<li>Services</li>
<li>About</li>
<li>Works</li>
<li>Projects</li>
</ul>
</nav>
<div class="hamburger">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</div>
</div>
<nav class="mobile-menu">
<ul>
<li>Home</li>
<li>About</li>
<li>Services</li>
<li>Works</li>
<li>Projects</li>
</ul>
</nav>
<section class="heading__container">
<div class="heading__content">
<div class="heading__title">
<h1><span>Emanuel</span> <br> Rajic</h1>
</div>
<div class="heading__subtitle">
<p>I am 16 years old Front-end developer and CS Student</p>
</div>
<div class="heading__button-box">
<button class="btn__read">Read More</button>
<button class="btn__contact btn__react">Get In Touch</button>
</div>
<div class="h__wrapper">
<div class="h__button">
<div class="icon"><i class="fab fa-twitter"></i></div>
<span>Twitter</span>
</div>
<div class="h__button">
<div class="icon"><i class="fab fa-instagram"></i></div>
<span>Instagram</span>
</div>
<div class="h__button">
<div class="icon"><i class="fab fa-github"></i></div>
<span>Github</span>
</div>
</div>
</div>
<div class="heading__image">
<img src="../assets/images/header/valentin-salja-0aX51h4WvAk-unsplash.jpg">
</div>
</section>
</header>
A combination of z-index:10000, which will give this element priority over everything (so being on top all the time), and position:fixed, which will make that element have a fixed position in the said place no matter the scrolling are, the culprits. Removing those two CSS properties would fix your "issue".

Why is the Flex text overlapping when Browser size is reduced?

If you reduce browser size, the text of "Discover" and "How it Works" overlap so that it looks like it says "Discover it works" "How".
How do I make it so that instead, the text of these Li items always stay separated? I tried doing flex: nowrap property but it had no effect.
Here is the codepen to show what I mean: https://codepen.io/hiarooo/pen/GRrzapM
Thanks for any help.
HTML
<header>
<div class="container">
<nav>
<div class="left-content">
<div class="header-user">
<img src="HOME/DoLogo.png" alt="logo" width="50px">
<p><span>Do</span></p>
</div>
<div class="header-tablet">
<div class="vl"></div>
<ul>
<li>Discover</li>
<li>How it works</li>
</ul>
</div>
</div>
<div class="right-content">
<div class="search">
<input type="text" placeholder="Search">
<i class="fas fa-search"></i>
</div>
<img id="notifications" src="HOME/Notification.svg" alt="Notification">
<div class="header-user">
<img src="HOME/uploadnav.png" alt="user">
</div>
<img class="mob" src="HOME/uploadnav.png" alt="user">
<img src="HOME/menu.svg" alt="hamburgermenu">
</div>
</nav>
</div>
</header>
CSS:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
width: 78%;
margin: 0 auto;
}
#media (max-width: 1330px) {
.container {
width: 90%;
margin: 0 auto;
}
}
/* Header */
header {
height: 80px;
border: 1px solid #e6e8ec;
}
nav {
display: flex;
flex-direction: row;
justify-content: space-between;
}
#notifications{
padding-right:20px;
}
.search {
display: inline;
height: 40px;
width: 256px;
border-radius: 8px;
padding: 10px 12px 10px 16px;
border: 2px solid #e6e8ec;
outline: none;
display: flex;
justify-content: space-between;
margin-right: 18px;
margin-left: 20px;
}
.search input {
outline: none;
border: none;
}
.search i {
color: #777e90;
}
.search:hover {
cursor: pointer;
}
.search input::-webkit-input-placeholder {
font-family: "Poppins", sans-serif;
color: #777e90;
font-size: 12px;
}
.button {
background-color: #3772ff;
padding: 12px 16px;
border-radius: 90px;
font-family: "DM Sans", sans-serif;
font-weight: 700;
font-size: 14px;
line-height: 16px;
text-align: center;
color: #fcfcfd;
text-decoration: none;
margin-left: 18px;
margin-right: 10px;
display: inline;
}
.header-user {
border-radius: 90px;
padding: 4px 12px 4px 4px;
border: 2px #e6e8ec solid;
width: 147px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
}
.header-user p {
padding-left: 6px;
display: inline-block;
font-family: "DM Sans", sans-serif;
font-weight: 700;
font-size: 14px;
line-height: 16px;
}
.header-user span {
color: #45b26b;
padding-left: 2px;
}
.left-content {
display: flex;
height: 80px;
justify-content: center;
align-items: center;
}
.mob {
display: none;
}
.vl {
border-left: 2px #e6e8ec solid;
height: 40px;
margin: 0 32px;
}
.left-content ul {
list-style: none;
}
.left-content ul li {
display: inline;
}
.left-content ul li a {
text-decoration: none;
padding-right: 32px;
font-family: "DM Sans", sans-serif;
font-weight: 700;
font-size: 14px;
line-height: 16px;
color: #777e90;
}
.right-content {
display: flex;
height: 80px;
justify-content: center;
align-items: center;
}
.right-content img {
cursor: pointer;
}
.menu {
display: none;
}
.header-tablet {
display: flex;
justify-content: space-between;
height: 80px;
align-items: center;
}
.topFont{
font-size: 14px;
font-family: "DM Sans", sans-serif;
font-weight: 700;
text-decoration: none;
color: #23262f;
}
.btn-1 {
font-size: 14px;
font-family: "DM Sans", sans-serif;
font-weight: 700;
text-decoration: none;
color: #23262f;
border: 2px solid #e6e8ec;
border-radius: 90px;
display: inline-block;
padding: 12px 16px;
margin-bottom: 0px;
}
.btn-1:hover {
background-color: #3772ff;
color: #fcfcfd;
/*border: none;*/
transition:all .2s ease;
-webkit-transition-delay:all .2s ease;
-moz-transition-delay:all .2s ease;
-ms-transition-delay:all .2s ease;
-o-transition-delay:all .2s ease;
}
/* input */
.round {
max-width: 100%;
height: 48px;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
border: 3px #f4f4f4 solid;
border-radius: 90px;
margin: 20px 0px;
}
.round i {
color: rgba(0, 0, 0, 0.3);
padding: 10px;
line-height: 80px;
}
.round input {
outline: none;
border: none;
padding-left: 16px;
}
.search-btn {
margin-top: 0px;
margin-bottom: 0px;
padding-left: 12px;
}
.round input::-webkit-input-placeholder {
font-family: "Poppins", sans-serif;
color: #777e90;
font-size: 12px;
}
.search-icon:hover {
cursor: pointer;
color: #3772ff;
}
#media (max-width: 1170px) {
.round {
width: 200px;
}
}
#media (max-width: 960px) {
.round {
width: 200px;
}
}
#media (max-width: 779px) {
.container {
width: 90%;
margin: 0 auto;
}
.header-tablet{
display:none;
}
.search {
display: none;
}
.menu {
display: inline;
}
.button {
display: none;
}
/* header user */
.header-user {
display: none;
}
Change this CSS setting:
.left-content ul li {
display: inline;
}
to
.left-content ul li {
display: inline-block;
}
That way the contents of that li element will form a (inline) block that can only wrap to a new line as a whole.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
width: 78%;
margin: 0 auto;
}
#media (max-width: 1330px) {
.container {
width: 90%;
margin: 0 auto;
}
}
/* Header */
header {
height: 80px;
border: 1px solid #e6e8ec;
}
nav {
display: flex;
flex-direction: row;
justify-content: space-between;
}
#notifications {
padding-right: 20px;
}
.search {
display: inline;
height: 40px;
width: 256px;
border-radius: 8px;
padding: 10px 12px 10px 16px;
border: 2px solid #e6e8ec;
outline: none;
display: flex;
justify-content: space-between;
margin-right: 18px;
margin-left: 20px;
}
.search input {
outline: none;
border: none;
}
.search i {
color: #777e90;
}
.search:hover {
cursor: pointer;
}
.search input::-webkit-input-placeholder {
font-family: "Poppins", sans-serif;
color: #777e90;
font-size: 12px;
}
.button {
background-color: #3772ff;
padding: 12px 16px;
border-radius: 90px;
font-family: "DM Sans", sans-serif;
font-weight: 700;
font-size: 14px;
line-height: 16px;
text-align: center;
color: #fcfcfd;
text-decoration: none;
margin-left: 18px;
margin-right: 10px;
display: inline;
}
.header-user {
border-radius: 90px;
padding: 4px 12px 4px 4px;
border: 2px #e6e8ec solid;
width: 147px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
}
.header-user p {
padding-left: 6px;
display: inline-block;
font-family: "DM Sans", sans-serif;
font-weight: 700;
font-size: 14px;
line-height: 16px;
}
.header-user span {
color: #45b26b;
padding-left: 2px;
}
.left-content {
display: flex;
height: 80px;
justify-content: center;
align-items: center;
}
.mob {
display: none;
}
.vl {
border-left: 2px #e6e8ec solid;
height: 40px;
margin: 0 32px;
}
.left-content ul {
list-style: none;
}
.left-content ul li {
display: inline-block;
}
.left-content ul li a {
text-decoration: none;
padding-right: 32px;
font-family: "DM Sans", sans-serif;
font-weight: 700;
font-size: 14px;
line-height: 16px;
color: #777e90;
}
.right-content {
display: flex;
height: 80px;
justify-content: center;
align-items: center;
}
.right-content img {
cursor: pointer;
}
.menu {
display: none;
}
.header-tablet {
display: flex;
justify-content: space-between;
height: 80px;
align-items: center;
}
.topFont {
font-size: 14px;
font-family: "DM Sans", sans-serif;
font-weight: 700;
text-decoration: none;
color: #23262f;
}
.btn-1 {
font-size: 14px;
font-family: "DM Sans", sans-serif;
font-weight: 700;
text-decoration: none;
color: #23262f;
border: 2px solid #e6e8ec;
border-radius: 90px;
display: inline-block;
padding: 12px 16px;
margin-bottom: 0px;
}
.btn-1:hover {
background-color: #3772ff;
color: #fcfcfd;
/*border: none;*/
transition: all .2s ease;
-webkit-transition-delay: all .2s ease;
-moz-transition-delay: all .2s ease;
-ms-transition-delay: all .2s ease;
-o-transition-delay: all .2s ease;
}
/* input */
.round {
max-width: 100%;
height: 48px;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
border: 3px #f4f4f4 solid;
border-radius: 90px;
margin: 20px 0px;
}
.round i {
color: rgba(0, 0, 0, 0.3);
padding: 10px;
line-height: 80px;
}
.round input {
outline: none;
border: none;
padding-left: 16px;
}
.search-btn {
margin-top: 0px;
margin-bottom: 0px;
padding-left: 12px;
}
.round input::-webkit-input-placeholder {
font-family: "Poppins", sans-serif;
color: #777e90;
font-size: 12px;
}
.search-icon:hover {
cursor: pointer;
color: #3772ff;
}
#media (max-width: 1170px) {
.round {
width: 200px;
}
}
#media (max-width: 960px) {
.round {
width: 200px;
}
}
#media (max-width: 779px) {
.container {
width: 90%;
margin: 0 auto;
}
.header-tablet {
display: none;
}
.search {
display: none;
}
.menu {
display: inline;
}
.button {
display: none;
}
/* header user */
.header-user {
display: none;
}
<header>
<div class="container">
<nav>
<div class="left-content">
<div class="header-user">
<img src="HOME/DoLogo.png" alt="logo" width="50px">
<p><span>Do</span></p>
</div>
<div class="header-tablet">
<div class="vl"></div>
<ul>
<li>Discover</li>
<li>How it works</li>
</ul>
</div>
</div>
<div class="right-content">
<div class="search">
<input type="text" placeholder="Search">
<i class="fas fa-search"></i>
</div>
<img id="notifications" src="HOME/Notification.svg" alt="Notification">
<div class="header-user">
<img src="HOME/uploadnav.png" alt="user">
</div>
<img class="mob" src="HOME/uploadnav.png" alt="user">
<img src="HOME/menu.svg" alt="hamburgermenu">
</div>
</nav>
</div>
</header>

Dropdown menu works but only when I hover and not click

My menu works but only when I hover and not click. It does not show up on mobile devices it only shows up as services but not clickable.
here is the code.
I believe I am missing something to make the dropdown box clickable ect.
/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
body {
background: #fff4e9;
color: #444;
font-family: "Open Sans", sans-serif;
}
a {
color: #993300;
transition: 0.5s;
}
a:hover,
a:active,
a:focus {
color: #993300;
outline: none;
text-decoration: none;
}
p {
padding: 0;
margin: 0 0 30px 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: "Montserrat", sans-serif;
font-weight: 400;
margin: 0 0 20px 0;
padding: 0;
}
/* Back to top button */
.back-to-top {
position: fixed;
display: none;
background: #993300;
color: #fff;
padding: 6px 12px 9px 12px;
font-size: 16px;
border-radius: 2px;
right: 15px;
bottom: 15px;
transition: background 0.5s;
}
.back-to-top:focus {
background: #993300;
color: #fff;
outline: none;
}
.back-to-top:hover {
background: #993300;
color: #fff;
}
/*--------------------------------------------------------------
# Top Bar
--------------------------------------------------------------*/
#topbar {
background: #fff4e9;
padding: 10px 0;
border-bottom: 1px solid #eee;
font-size: 14px;
}
#topbar .contact-info a {
line-height: 1;
color: #555;
}
#topbar .contact-info a:hover {
color: #993300;
}
#topbar .contact-info i {
color: #993300;
padding: 4px;
}
#topbar .contact-info .fa-phone {
padding-left: 20px;
margin-left: 20px;
border-left: 1px solid #e9e9e9;
}
#topbar .social-links a {
color: #555;
padding: 4px 12px;
display: inline-block;
line-height: 1px;
border-left: 1px solid #e9e9e9;
}
#topbar .social-links a:hover {
color: #993300;
}
#topbar .social-links a:first-child {
border-left: 0;
}
/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
#header {
padding: 20px 0;
height: 84px;
transition: all 0.5s;
z-index: 997;
background: #fff4e9;
box-shadow: 0px 6px 9px 0px rgba(0, 0, 0, 0.06);
}
#header #logo h1 {
font-size: 42px;
margin: 0;
padding: 0;
line-height: 1;
font-family: "Montserrat", sans-serif;
font-weight: 700;
}
#header #logo h1 a {
color: #993300;
line-height: 1;
display: inline-block;
}
#header #logo h1 a span {
color: #993300;
}
#header #logo img {
padding: 0;
margin: 0;
}
/*--------------------------------------------------------------
# Intro Section
--------------------------------------------------------------*/
#intro {
width: 100%;
height: 60vh;
position: relative;
background: url("../img/intro-carousel/1.jpg") no-repeat;
background-size: cover;
}
#intro .intro-content {
position: absolute;
bottom: 0;
top: 0;
left: 0;
right: 0;
z-index: 10;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
text-align: center;
}
#intro .intro-content h2 {
color: #993300;
margin-bottom: 30px;
font-size: 64px;
font-weight: 700;
}
#intro .intro-content h2 span {
color: #993300;
text-decoration: underline;
}
#intro .intro-content .btn-get-started,
#intro .intro-content .btn-projects {
font-family: "Raleway", sans-serif;
font-size: 15px;
font-weight: bold;
letter-spacing: 1px;
display: inline-block;
padding: 10px 32px;
border-radius: 2px;
transition: 0.5s;
margin: 10px;
color: #fff;
}
#intro .intro-content .btn-get-started {
background: #993300;
border: 2px solid #993300;
}
#intro .intro-content .btn-get-started:hover {
background: none;
color: #993300;
}
#intro .intro-content .btn-projects {
background: #993300;
border: 2px solid #993300;
}
#intro .intro-content .btn-projects:hover {
background: none;
color: #993300;
}
#intro #intro-carousel {
z-index: 8;
}
#intro #intro-carousel::before {
content: '';
background-color: );
position: absolute;
height: 100%;
width: 100%;
top: 0;
right: 0;
left: 0;
bottom: 0;
z-index: 7;
}
#intro #intro-carousel .item {
width: 100%;
height: 60vh;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
transition-property: opacity;
}
/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Nav Menu Essentials */
.nav-menu,
.nav-menu * {
margin: 0;
padding: 0;
list-style: none;
}
.nav-menu>li>.dropdown-menu {
background-color: #fff4e9;
}
.nav-menu>li>.dropdown-item {
background-color: #fff4e9;
}
.dropdown-menu>li>a:hover {
background-color: #fff4e9;
background-image: none;
}
.nav-menu ul {
position: absolute;
display: none;
top: 100%;
left: 0;
z-index: 99;
}
.nav-menu li {
position: relative;
white-space: nowrap;
}
.nav-menu>li {
float: left;
}
.nav-menu li:hover>ul,
.nav-menu li.sfHover>ul {
display: block;
}
.nav-menu ul ul {
top: 0;
left: 100%;
}
.nav-menu ul li {
min-width: 180px;
}
/* Nav Menu Arrows */
.sf-arrows .sf-with-ul {
padding-right: 22px;
}
.sf-arrows .sf-with-ul:after {
content: "\f107";
position: absolute;
right: 8px;
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
}
.sf-arrows ul .sf-with-ul:after {
content: "\f105";
}
/* Nav Meu Container */
#nav-menu-container {
float: right;
margin: 0;
}
/* Nav Meu Styling */
.nav-menu a {
padding: 10px 8px;
text-decoration: none;
display: inline-block;
color: #555;
font-family: "Raleway", sans-serif;
font-weight: 700;
font-size: 14px;
outline: none;
}
.nav-menu li:hover>a,
.nav-menu .menu-active>a {
color: #993300;
}
.nav-menu>li {
margin-left: 10px;
}
.nav-menu ul {
margin: 4px 0 0 0;
padding: 10px;
box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
background: #fff;
}
.nav-menu ul li {
transition: 0.3s;
}
.nav-menu ul li a {
padding: 10px;
color: #333;
transition: 0.3s;
display: block;
font-size: 13px;
text-transform: none;
}
.nav-menu ul li:hover>a {
color: #993300;
}
.nav-menu ul ul {
margin: 0;
}
/* Mobile Nav Toggle */
#mobile-nav-toggle {
position: fixed;
right: 0;
top: 0;
z-index: 999;
margin: 20px 20px 0 0;
border: 0;
background: none;
font-size: 24px;
display: none;
transition: all 0.4s;
outline: none;
cursor: pointer;
}
#mobile-nav-toggle i {
color: #555;
}
/* Mobile Nav Styling */
#mobile-nav {
position: fixed;
top: 0;
padding-top: 18px;
bottom: 0;
z-index: 998;
background: rgba(52, 59, 64, 0.9);
left: -260px;
width: 260px;
overflow-y: auto;
transition: 0.4s;
}
#mobile-nav ul {
padding: 0;
margin: 0;
list-style: none;
}
#mobile-nav ul li {
position: relative;
}
#mobile-nav ul li a {
color: #fff;
font-size: 16px;
overflow: hidden;
padding: 10px 22px 10px 15px;
position: relative;
text-decoration: none;
width: 100%;
display: block;
outline: none;
}
#mobile-nav ul li a:hover {
color: #fff;
}
#mobile-nav ul li li {
padding-left: 30px;
}
#mobile-nav ul .menu-has-children i {
position: absolute;
right: 0;
z-index: 99;
padding: 15px;
cursor: pointer;
color: #fff;
}
#mobile-nav ul .menu-has-children i.fa-chevron-up {
color: #993300;
}
#mobile-nav ul .menu-item-active {
color: #993300;
}
#mobile-body-overly {
width: 100%;
height: 100%;
z-index: 997;
top: 0;
left: 0;
position: fixed;
background: rgba(52, 59, 64, 0.9);
display: none;
}
/* Mobile Nav body classes */
body.mobile-nav-active {
overflow: hidden;
}
body.mobile-nav-active #mobile-nav {
left: 0;
}
body.mobile-nav-active #mobile-nav-toggle {
color: #fff;
}
/*--------------------------------------------------------------
# Sections
--------------------------------------------------------------*/
/* Sections Header
--------------------------------*/
.section-header {
margin-bottom: 30px;
}
.section-header h2 {
font-size: 32px;
color: #993300;
text-transform: uppercase;
font-weight: 700;
position: relative;
padding-bottom: 20px;
}
.section-header h3 {
font-size: 26px;
color: #993300;
text-transform: uppercase;
font-weight: 700;
position: relative;
padding-bottom: 20px;
}
.section-header h2::before {
content: '';
position: absolute;
display: block;
width: 50px;
height: 3px;
background: #993300;
bottom: 0;
left: 0;
}
.section-header h3::before {
content: '';
position: absolute;
display: block;
width: 50px;
height: 3px;
background: #993300;
bottom: 0;
left: 0;
}
.section-header p {
padding: 0;
margin: 0;
}
/* About Section
--------------------------------*/
#about {
padding: 60px 0 30px 0;
}
#about .about-img {
overflow: hidden;
}
#about .about-img img {
margin-left: -15px;
max-width: 100%;
}
#about .content h2 {
color: #993300;
font-weight: 700;
font-size: 36px;
font-family: "Raleway", sans-serif;
}
#about .content h3 {
color: #555;
font-weight: 300;
font-size: 18px;
line-height: 26px;
font-style: italic;
}
#about .content p {
line-height: 26px;
}
#about .content p:last-child {
margin-bottom: 0;
}
#about .content i {
font-size: 20px;
padding-right: 4px;
color: #993300;
}
#about .content ul {
list-style: none;
padding: 0;
}
#about .content ul li {
padding-bottom: 10px;
}
/* Services Section
--------------------------------*/
#services {
padding: 30px 0 0 0;
}
#services .box {
padding: 40px;
margin-bottom: 40px;
box-shadow: 10px 10px 15px rgba(73, 78, 92, 0.1);
background: #fff4e9;
transition: 0.4s;
}
#services .box:hover {
box-shadow: 0px 0px 30px rgba(73, 78, 92, 0.15);
transform: translateY(-10px);
-webkit-transform: translateY(-10px);
-moz-transform: translateY(-10px);
}
#services .box .icon {
float: left;
}
#services .box .icon i {
color: #444;
font-size: 64px;
transition: 0.5s;
line-height: 0;
margin-top: 34px;
}
#services .box .icon i:before {
background: #993300;
background: linear-gradient(45deg, #993300 0%, #993300 100%);
background-clip: border-box;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
#services .box h4 {
margin-left: 100px;
font-weight: 700;
margin-bottom: 15px;
font-size: 22px;
}
#services .box h4 a {
color: #444;
}
#services .box p {
font-size: 14px;
margin-left: 100px;
margin-bottom: 0;
line-height: 24px;
}
/* Clients Section
--------------------------------*/
#clients {
padding: 30px 0;
}
#clients img {
max-width: 100%;
opacity: 0.5;
transition: 0.3s;
padding: 15px 0;
}
#clients img:hover {
opacity: 1;
}
#clients .owl-nav,
#clients .owl-dots {
margin-top: 5px;
text-align: center;
}
#clients .owl-dot {
display: inline-block;
margin: 0 5px;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #ddd;
}
#clients .owl-dot.active {
background-color: #993300;
}
/* Our Portfolio Section
--------------------------------*/
#portfolio {
background: #fff4e9;
padding: 30px 0;
}
#portfolio .portfolio-overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 1;
transition: all ease-in-out 0.4s;
}
#portfolio .portfolio-item {
overflow: hidden;
position: relative;
padding: 0;
vertical-align: middle;
text-align: center;
}
#portfolio .portfolio-item h2 {
color: #ffffff;
font-size: 24px;
margin: 0;
text-transform: capitalize;
font-weight: 700;
}
#portfolio .portfolio-item img {
transition: all ease-in-out 0.4s;
width: 100%;
}
#portfolio .portfolio-item:hover img {
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
#portfolio .portfolio-item:hover .portfolio-overlay {
opacity: 1;
background: rgba(0, 0, 0, 0.7);
}
#portfolio .portfolio-info {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
/* Testimonials Section
--------------------------------*/
#testimonials {
padding: 30px 0;
}
#testimonials .testimonial-item {
box-sizing: content-box;
padding: 30px 30px 0 30px;
margin: 30px 15px;
text-align: center;
min-height: 350px;
box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.08);
}
#testimonials .testimonial-item .testimonial-img {
width: 90px;
border-radius: 50%;
border: 4px solid #fff;
margin: 0 auto;
}
#testimonials .testimonial-item h3 {
font-size: 18px;
font-weight: bold;
margin: 10px 0 5px 0;
color: #111;
}
#testimonials .testimonial-item h4 {
font-size: 14px;
color: #999;
margin: 0;
}
#testimonials .testimonial-item .quote-sign-left {
margin-top: -15px;
padding-right: 10px;
display: inline-block;
width: 37px;
}
#testimonials .testimonial-item .quote-sign-right {
margin-bottom: -15px;
padding-left: 10px;
display: inline-block;
max-width: 100%;
width: 37px;
}
#testimonials .testimonial-item p {
font-style: italic;
margin: 0 auto 15px auto;
}
#testimonials .owl-nav,
#testimonials .owl-dots {
margin-top: 5px;
text-align: center;
}
#testimonials .owl-dot {
display: inline-block;
margin: 0 5px;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #ddd;
}
#testimonials .owl-dot.active {
background-color: #993300;
}
/* Call To Action Section
--------------------------------*/
#call-to-action {
background: #081e5b;
background-size: cover;
padding: 40px 0;
}
#call-to-action .cta-title {
color: #fff;
font-size: 28px;
font-weight: 700;
}
#call-to-action .cta-text {
color: #fff;
}
#call-to-action .cta-btn {
font-family: "Montserrat", sans-serif;
font-weight: 700;
font-size: 16px;
letter-spacing: 1px;
display: inline-block;
padding: 8px 26px;
border-radius: 3px;
transition: 0.5s;
margin: 10px;
border: 3px solid #fff;
color: #fff;
}
#call-to-action .cta-btn:hover {
background: #993300;
border: 3px solid #993300;
}
/* Our Team Section
--------------------------------*/
#team {
background: #fff;
padding: 30px 0 0 0;
}
#team .member {
text-align: center;
margin-bottom: 20px;
}
#team .member .pic {
overflow: hidden;
text-align: center;
}
#team .member .pic img {
max-width: 100%;
}
#team .member .details {
background: #993300;
color: #fff;
padding: 15px;
border-radius: 0 0 3px 3px;
}
#team .member h4 {
font-weight: 700;
margin-bottom: 2px;
font-size: 18px;
}
#team .member span {
font-style: italic;
display: block;
font-size: 13px;
}
#team .member .social {
margin-top: 5px;
}
#team .member .social a {
color: #fff;
}
#team .member .social i {
font-size: 16px;
margin: 0 2px;
}
/* Contact Section
--------------------------------*/
#contact {
padding: 30px 0;
}
#contact .contact-info {
margin-bottom: 20px;
text-align: center;
}
#contact .contact-info i {
font-size: 48px;
display: inline-block;
margin-bottom: 10px;
color: #993300;
}
#contact .contact-info address,
#contact .contact-info p {
margin-bottom: 0;
color: #000;
}
#contact .contact-info h3 {
font-size: 18px;
margin-bottom: 15px;
font-weight: bold;
text-transform: uppercase;
color: #999;
}
#contact .contact-info a {
color: #000;
}
#contact .contact-info a:hover {
color: #993300;
}
#contact .contact-address,
#contact .contact-phone,
#contact .contact-email {
margin-bottom: 20px;
}
#contact #google-map {
height: 290px;
margin-bottom: 20px;
}
#contact .form #sendmessage {
color: #993300;
border: 1px solid #993300;
display: none;
text-align: center;
padding: 15px;
font-weight: 600;
margin-bottom: 15px;
}
#contact .form #errormessage {
color: red;
display: none;
border: 1px solid red;
text-align: center;
padding: 15px;
font-weight: 600;
margin-bottom: 15px;
}
#contact .form #sendmessage.show,
#contact .form #errormessage.show,
#contact .form .show {
display: block;
}
#contact .form .validation {
color: red;
display: none;
margin: 0 0 20px;
font-weight: 400;
font-size: 13px;
}
#contact .form input,
#contact .form textarea {
padding: 10px 14px;
border-radius: 0;
box-shadow: none;
font-size: 15px;
}
#contact .form button[type="submit"] {
background: #993300;
border: 0;
border-radius: 3px;
padding: 10px 30px;
color: #fff;
transition: 0.4s;
cursor: pointer;
}
#contact .form button[type="submit"]:hover {
background: #2dc899;
}
/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
#footer {
background: #fff4e9;
padding: 0 0 30px 0;
font-size: 14px;
}
#footer .copyright {
text-align: center;
padding-top: 30px;
}
#footer .credits {
text-align: center;
font-size: 13px;
color: #555;
}
#footer .credits a {
color: #993300;
}
#media (min-width: 768px) {
#contact .contact-address,
#contact .contact-phone,
#contact .contact-email {
padding: 20px 0;
}
#contact .contact-phone {
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
}
}
#media (min-width: 769px) {
#call-to-action .cta-btn-container {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
-ms-flex-pack: end;
justify-content: flex-end;
}
}
#media (max-width: 768px) {
.back-to-top {
bottom: 15px;
}
#header {
padding: 20px 0;
height: 74px;
}
#header #logo h1 {
font-size: 34px;
}
#header #logo img {
max-height: 40px;
}
#nav-menu-container {
display: none;
}
#mobile-nav-toggle {
display: inline;
}
#about .about-img {
height: auto;
}
#about .about-img img {
margin-left: 0;
padding-bottom: 30px;
}
}
#media (max-width: 767px) {
#intro .intro-content h2 {
font-size: 34px;
}
#services .box .box {
margin-bottom: 20px;
}
#services .box .icon {
float: none;
text-align: center;
padding-bottom: 15px;
}
#services .box h4,
#services .box p {
margin-left: 0;
text-align: center;
}
#testimonials .testimonial-item {
margin: 30px 10px;
}
}
#media (max-width: 576px) {
#contact #google-map {
margin-top: 20px;
}
}
#thumbnails {
display: block;
margin-bottom: 10px;
}
#thumbnails ul li {
float: left;
margin-right: 12px;
margin-left: 12px;
margin-bottom: 12px;
}
<nav id="nav-menu-container">
<ul class="nav-menu">
<li class="menu-active">Home</li>
<li>About us</li>
<li class="dropdown">
<a class="dropdown-item">Services</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="page1.html">page1</a></li>
<li><a class="dropdown-item" href="page2.html">page2</a></li>
</ul>
<li>page3</li>
<li>page4</li>
</ul>
</nav>
The answers are right in front of you! #MattOpen sent you the Bootstrap nav components.
I am not going to do the work for you as you stated you was new to this so the best way to learn is to just get stuck in! make a copy so you can always revert and test.
Have a little look at this code below and then play around with you CSS :)`
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="index.html">Home<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Services
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="page1.html">Dropdown Page 1</a>
<a class="dropdown-item" href="page2.html">Dropdwon Page 2</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="page3.html">page 3</a>
</li>
<li class="nav-item">
<a class="nav-link" href="page4.html">page 4</a>
</li>
</ul>
</div>
`