*CSS Only* Images showing through open menu pane - html

I can't seem to get my open nav menu pane to display on top of the page content, mainly images. I've tried changing z-index but that only seems to make things worse.
Thanks for any help, this is for a school project (my first html/css class). I'm not sure if I need to also post the HTML here?
'''#import url('https://fonts.googleapis.com/css?family=Libre+Caslon+Text:400,700&display=swap');
body {
font-family: Libre Caslon Text;
background-color: #FFAB91;
}
.body-text {
padding-top: 20vh;
text-align: center;
position: relative;
}
.hamburger-icon {
position: absolute;
z-index: 1;
top: 5vh;
left: 5vw;
padding-bottom: 2vh;
}
.hamburger-icon span {
height: 5px;
width: 40px;
background-color: black;
display: block;
margin: 5px 0px 5px 0px;
transition: 0.7s ease-in-out;
transform: none;
}
#openmenu:checked~.menu-pane {
left: -5vw;
transform: translateX(-5vw);
}
#openmenu:checked~.body-text {
display: none;
}
#openmenu:checked~.hamburger-icon span:nth-of-type(2) {
transform: translate(0%, 175%) rotate(-45deg);
background-color: white;
}
#openmenu:checked~.hamburger-icon span:nth-of-type(3) {
transform: rotate(45deg);
background-color: white;
}
#openmenu:checked~.hamburger-icon span:nth-of-type(1) {
opacity: 0;
}
#openmenu:checked~.hamburger-icon span:nth-of-type(4) {
opacity: 0;
}
div.menu-pane {
background-color: #000;
position: absolute;
transform: translateX(-105vw);
transform-origin: (0, 0);
width: 100vw;
height: 100%;
transition: 0.6s ease-in-out;
}
.menu-pane p {
color: black;
font-size: 0.6em;
}
.menu-pane nav {
padding: 10%;
}
.menu-links li,
a,
span {
transition: 0.5s ease-in-out;
}
.menu-pane ul {
padding: 10%;
display: inline-block;
}
.menu-pane li {
padding-top: 20px;
padding-bottom: 20px;
margin-left: 10px;
font-size: 1em;
}
.menu-pane li:first-child {
font-size: 1.3em;
margin-left: -10px;
}
.menu-links li a {
color: white;
text-decoration: none;
}
.menu-links li:hover a {
color: #FFAB91;
}
.menu-links li:first-child:hover a {
color: black;
background-color: #FFAB91;
}
#eug-info {
background-color: #FFAB91;
border: 2px solid;
border-color: #FFAB91;
display: block;
opacity: 0;
}
.menu-links li:first-child:hover #eug-info {
opacity: 1;
}
.menu-links li:first-child:hover #spring-info {
opacity: 1;
}
#spring-info {
background-color: #FFAB91;
border: 2px solid;
border-color: #FFAB91;
display: block;
opacity: 0;
}
.menu-links li:first-child a {
padding: 5px;
}
input.hamburger-checkbox {
position: absolute;
z-index: 3;
top: 5vh;
left: 5vw;
width: 10vw;
opacity: 0;
height: 6vh;
}'''
Images showing through open menu pane

Related

Unable to get submenu to display to right of right caret. Displays under instead and cannot be clicked

Learning over here. Creating a nav bar for my teams Wiki site and having issues with getting the submenu to display to the right of the right caret. The submenu instead shows up at the bottom of the dropdown menu but cannot be clicked on.
Any help is appreciated. My HMTL is below and then the CSS is below that.
<li class="dropdown">
For HM's<span class="caret"></span>
<ul class="dropdown-menu">
<li class="dropdown-submenu">
<b>Campus</b>
<ul class="dropdown-menu">
<li>Intern HM Self Service Portal</li>
<li>Talent Management and Planning</li>
<li>Requisition Management</li>
<li class="dropdown-submenu">Managing an Intern</li>
<ul class="dropdown-menu">
<li>Intern Mentors Under Resources Tab</li>
</ul>
`
:root {
--awsui-grey-100: rgb(250,250,250); /* Oxygen */
--awsui-grey-200: rgb(234,237,237); /* Chromium */
--awsui-grey-300: rgb(213,219,219); /* Zinc */
--awsui-grey-400: rgb(170,183,184); /* Silver */
--awsui-grey-500: rgb(134,149,150); /* Platinum */
--awsui-grey-600: rgb(84,91,100); /* Mercury */
--awsui-grey-900: rgb(22,25,31); /* Lead */
--awsui-orange-500: rgb(236,114,17); /* Copper */
--awsui-orange-600: rgb(235,95,7); /* Bromine */
--awsui-blue-500: rgb(0,161,201); /* Argon */
--awsui-blue-600: rgb(0,125,188); /* Cobalt */
--awsui-green-500: rgb(106,175,53); /* Fluorine */
--awsui-green-600: rgb(30,137,0); /* Phosphorous */
--awsui-squid-ink: rgb(35,47,62); /* Squid Ink */
--awsui-squid-ink-transparent: rgba(35,47,62,.5); /* Squid Ink half opacity */
--awsui-amazon-orange: rgb(255,153,0); /* Amazon Orange */
--awsui-amazon-orange-transparent: rgb(255,153,0,0.5); /* Amazon Orange */
--base-type: var(--awsui-grey-200);
--base-header: var(--awsui-grey-100);
--base-inverted: var(--awsui-grey-900);
}
#sitewide-announcement-banner .hidden-print {
background: rgb(241, 250, 255)!important;
border: 1px solid var(--awsui-blue-600)!important;
color: var(--awsui-grey-900)!important;
padding: 14px 20px!important;
margin: 20px 0!important;
}
/*permissions thing, messes with header*/
#xdocPrimaryOwner {display: none;}
.main,
#docextrapanes {
/* background: var(--awsui-grey-200); */
}
.navbar #nav-links div {
color: #000000;
}
.navbar ul.nav.navbar-nav li a.icon-navbar:focus,
.navbar ul.nav.navbar-nav li a.icon-navbar:hover {
/* background-color:#36729e; */
background-color:#888888;
outline: initial;
}
.navbar #companylogo, .navbar #nav-create-page, .navbar #nav-search {
display: inline-block;
vertical-align: middle;
}
#menuview .navbar {
background: white;
box-shadow: 0 1px 1px 0 rgba(0,28,36,.5);
}
#headerglobalsearchinput {
height: 30px;
border: 1px solid var(--awsui-grey-600);
}
/* MISC STUFF */
/* Disabled the edit button because the WYSIWYG destroys content when transcluding the header */
#tmEdit {
display: none!important;
}
/*Edit buttons override */
.thisIsAPageView > .document-header {
width: 400px !important;
}
/* Disables a paragraph that gets injected between the header and navigation by the wiki */
.airwolf-header + p {
display: none;
}
.navbar #nav-create-page {
display: none;
}
/* TYPOGRAPHY */
body, p, a, li, h1, h2, h3, h4, h5, h6 {
font-family: "Amazon Ember", Helvetica, Arial, sans-serif;
}
body,
#body p,
#body a,
#body li,
#body h1,
#body h2,
#body h3,
#body h4,
#body h5,
#body h6 {
font-family: "Amazon Ember", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 20px;
}
#body h1,
#body h2,
#body h3,
#body h4,
#body h5,
#body h6 {
padding: 5px 0;
border-bottom: 1px solid rgba(0,0,0,0);
}
#body .special {font-size: 44px; line-height: 50px; font-weight: 300;}
#body h1:first-of-type {font-size: 28px; line-height: 40px; margin-top: 0px;}
#body h1 {font-size: 28px; line-height: 40px; font-weight: 700;}
#body h2 {font-size: 22px; line-height: 20px; font-weight: 700;}
#body h3 {font-size: 18px; line-height: 20px; font-weight: 700;}
#body h4 {font-size: 15px; line-height: 20px;}
#body h5 {font-size: 15px; line-height: 20px;}
#body h6 {font-size: 14px; line-height: 20px;}
/* WIKI MODS */
/* ========================================================================== */
/* Main content column */
#body #contentcontainer .main {
padding: 0 20px 20px;
}
.airwolf-header {
margin: 0 -20px!important;
width: auto!important;
}
/* Breadcrumbs*/
#hierarchy {
margin: 0 -20px;
padding: 10px 20px;
border-radius: 0;
background-color: var(--awsui-squid-ink);
position: relative;
z-index: 20;
box-shadow: 0 2px 0 2px rgba(0,0,0,.2);
}
#mainContentArea > .xcontent {
margin-top: 0;
}
.breadcrumb > li + li:before {color: var(--awsui-grey-300);}
.breadcrumb a {color: var(--awsui-grey-200);}
.breadcrumb > .active:last-of-type a {color: var(--awsui-grey-100);}
/* Document meta */
.xdocLastModification {
font-size: 10px;
position: absolute;
top: -60px;
margin: 0;
display: none;
}
.xdocLastModification .wikilink,
#body .xdocLastModification .wikilink a {
font-size: 10px;
}
.titleDivider {
display: none;
}
.document-header {
margin: 0;
position: relative;
z-index: 25;
top: -38px;
width: 250px;
float: right;
}
.document-header .document-menu,
.document-header .document-info {
margin: 0 auto;
padding: 0;
}
.document-header .document-menu {
width: 100%;
opacity: 0.1;
transition: .2s opacity ease;
}
.document-header .document-menu:hover {
opacity: 1;
}
.document-header .document-info {
pointer-events: none;
}
#document-title {
display: none;
}
#document-title h1 {
background: none;
}
#xwikicontent {
position: relative;
top: -35px;
}
#xwikicontent,
#docextrapanes {
/* background: var(--awsui-grey-200); */
}
.btn, input.button {
background-image: none;
background-color: var(--awsui-grey-100);
color: var(--awsui-grey-900);
border: 1px solid var(--awsui-grey-600);
font-weight: 700;
padding: 4px 20px;
}
.btn:hover, input.button:hover {
background-color: var(--awsui-grey-200);
background-image: none;
border: 1px solid var(--awsui-grey-900);
color: var(--awsui-grey-900);
}
.edit_section {
overflow: visible;
top: -11px;
opacity: 0.2;
transition: .2s opacity ease;
}
.edit_section:hover {
opacity: 1;
}
.edit_section + * {
clear: both;
}
.wikimodel-emptyline {
display: block;
}
#footerglobal {
z-index: 1;
}
/* Limits content to a fake content column */
#media screen and (min-width: 1200px) {
.airwolf-header ~ *:not(.navbar-inverse) {
max-width: 900px;
margin-left: auto;
margin-right: auto;
}
}
#media screen and (max-width: 768px) {
#menuview, #sitewide-announcement-banner {
display: none;
}
.btn-demo {
display: none;
}
.amazon-wiki-toc {
display: none;
}
.edit_section {
display: none;
}
.document-header {
opacity: 0;
pointer-events: none;
}
.navbar-collapse {
background-color: #121821!important;
margin: 2px -20px 0 -30px;
border: none!important;
padding-left: 50px;
}
.dropdown-header {
color: #aaaaaa!important;
}
}
#media (min-width: 768px) {
.navbar-collapse {
background-color: transparent!important;
}
}
/************************************
* Airwolf header - stripe animation
************************************/
.airwolf-header {
margin: 0 auto;
background-color: rgb(35,47,62);
position: relative;
width: 100%;
height: 170px;
overflow: hidden;
}
.airwolf-header::after {
z-index: 1;
box-shadow: 0 0 240px 240px rgba(0,0,0,.5);
content: '';
background: red;
width: 340px;
height: 340px;
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border-radius: 50%;
}
.airwolf-header-title {
z-index: 2;
font-family: "Amazon Ember", Helvetica, Arial, sans-serif;
letter-spacing: 2px;
position: absolute;
color: rgb(250,250,250);
top: 40px;
left: 50%;
transform: translate(-50%, -50%);
font-size: 50px;
line-height: 1.4;
font-weight: 700;
}
.airwolf-header-title::after {
z-index: 2;
display: block;
content: '';
width: 100%;
height: 1px;
background: rgb(255,153,0);
}
.airwolf-header-subtitle {
z-index: 2;
font-family: "Amazon Ember", Helvetica, Arial, sans-serif;
letter-spacing: 2px;
position: absolute;
color: rgb(250,250,250);
top: 99px;
left: 50%;
transform: translate(-50%, -50%);
font-size: 20px;
line-height: 1.4;
font-weight: 700;
}
.airwolf-header-stripe-shine {
position: absolute;
content: '';
background: white;
width: 100%;
height: 20px;
transform: rotate(-70deg);
animation-duration: 6s;
animation-name: shine;
animation-iteration-count: infinite;
}
.airwolf-header-stripe-shine.two {
height: 10px;
animation-duration: 3s;
}
.airwolf-header-stripe-fade {
display: block;
width: 1000px;
height: 50px;
background: rgb(236,114,17);
margin-left: -50px;
margin-top: -50px;
transform: rotate(-20deg);
animation-duration: 6s;
animation-name: fadeInOut;
animation-iteration-count: infinite;
}
.airwolf-header-stripe-fade.one {
background: rgb(255,153,0);
margin-bottom: 10px;
animation-duration: 6s;
}
.airwolf-header-stripe-fade.two {
background: rgb(236,114,17);
margin-bottom: 75px;
animation-duration: 17s;
}
.airwolf-header-stripe-fade.three {
background: rgb(236,114,17);
margin-bottom: 10px;
animation-duration: 7s;
}
.airwolf-header-stripe-fade.four {
animation-name: fadeInOutDark;
background: rgb(35,47,62);
margin-bottom: 30px;
animation-duration: 9s;
}
.airwolf-header-stripe-fade.five {
background: rgb(255,153,0);
margin-bottom: 150px;
animation-duration: 13s;
}
#keyframes shine {
0% {
transform: rotate(-90deg);
left: -100%;
background: rgba(255,255,255,0);
}
15% {
transform: rotate(-70deg);
}
25% {
left: 50%;
background: rgba(255,255,255,0.05);
}
100% {
transform: rotate(-90deg);
left: 150%;
background: rgba(255,255,255,0);
}
}
#menuview .navbar-brand {
width: 100px;
height: 25px;
margin-left: 5px;
display: block;
background-size: 100%;
}
#menuview .navbar-brand img {
display: none;
}
.navbar li.navbar-help-menu > a.dropdown-toggle {
color: var(--awsui-grey-900);
}
#keyframes fadeInOut {
0% {
opacity: 0;
}
50% {
opacity: 0.9;
}
100% {
opacity: 0;
}
}
#keyframes fadeInOutDark {
0% {
opacity: 0;
}
50% {
opacity: .5;
}
100% {
opacity: 0;
}
}
/************************************
* Navbar
************************************/
li {
display: block;
transition-duration: 0.5s;
}
li:hover {
cursor: pointer;
}
ul li ul {
visibility: hidden;
opacity: 0;
position: absolute;
transition: all 0.5s ease;
margin-top: 1rem;
left: 0;
display: none;
}
ul li:hover > ul,
ul li ul:hover {
visibility: visible;
opacity: 1;
display: block;
}
ul li ul li {
clear: both;
width: 100%;
}
.navbar-nav.navbar-center {
position: relative;
left: 50%;
transform: translatex(-50%);
}
.navbar-inverse {
width: 100%;
display: inline-block;
top: -45px;
background-color: transparent!important;
background-image: none!important;
border: none;
z-index: 2;
}
/* Menu Hover */
.navbar-inverse .navbar-nav > li > a {
color: #fff!important;
padding-top: 5px;
padding-bottom: 5px;
}
/* Menu Hover */
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus,
.navbar-inverse .navbar-nav > li > a:active {
background: rgb(236,114,17);
color: #000!important;
}
/* Menu Click After */
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover,
.navbar-inverse .navbar-nav > .open > a:focus {
background: rgb(236,114,17);
color: #000!important;
}
.dropdown-menu {
margin: 2px 0 0 -1px;
}
/* Dropdown Menu Hover */
.dropdown-menu li > a:active,
.dropdown-menu li > a:focus,
.dropdown-menu li > a:hover {
position: relative;
background: rgb(236,114,17);
color: #000!important;
outline: initial;
}
.dropdown-header {
font-weight: 900;
color: #232f3e;
text-transform: uppercase;
margin-left: -5px!important;
}
/* Menu Collapsed Mode */
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
background: rgb(236,114,17);
color: #000!important;
outline: initial;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
padding-left: 5px;
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #ccc;
margin-top: 5px;
margin-right: -10px;
}
li {
display: block;
transition-duration: 0.5s;
}
li:hover {
cursor: pointer;
}
ul li ul {
visibility: hidden;
opacity: 0;
position: absolute;
transition: all 0.5s ease;
margin-top: 1rem;
left: 0;
display: none;
}
ul li:hover > ul,
ul li ul:hover {
visibility: visible;
opacity: 1;
display: block;
}
ul li ul li {
clear: both;
width: 100%;
}
/************************************
* TOC flyout modal
************************************/
.modal.left .modal-dialog,
.modal.right .modal-dialog {
position: fixed;
margin: auto;
width: 320px;
height: 100%;
-webkit-transform: translate3d(0%, 0, 0);
-ms-transform: translate3d(0%, 0, 0);
-o-transform: translate3d(0%, 0, 0);
transform: translate3d(0%, 0, 0);
}
.modal.left .modal-content,
.modal.right .modal-content {
height: 100%;
overflow-y: auto;
}
.modal.left .modal-body,
.modal.right .modal-body {
padding: 15px 15px 80px;
}
/*Modal fly from left*/
.modal.left.fade .modal-dialog{
left: -320px;
-webkit-transition: opacity 0.3s linear, left 0.3s ease-out;
-moz-transition: opacity 0.3s linear, left 0.3s ease-out;
-o-transition: opacity 0.3s linear, left 0.3s ease-out;
transition: opacity 0.3s linear, left 0.3s ease-out;
}
.modal.left.fade.in .modal-dialog{
left: 0;
}
/* Modal style */
.modal-content {
border-radius: 0;
border: none;
top: 201px;
}
.modal-header {
background-color: #dddddd;
color: #000000;
margin-top: -30px;
text-align: center;
font-weight: 700;
padding: 10px 10px 0px 10px;
}
.modal-body {
margin-top: -30px;
}
/* TOC button */
.btn-demo {
margin: 0px;
padding: 10px 15px;
border-radius: 0;
font-size: 16px;
background-color: #232f3e;
color: #ffffff;
left: 0!important;
position: fixed;
width: 170px;
height: 50px;
top: 40%;
transform: rotate(-90deg);
margin-left: -60px;
}
.btn-demo:hover,
.btn-demo:focus {
outline: 0;
background: rgb(236,114,17)!important;
color: #000000;
}

The navbar responsive issue when I resize the browser width

The Burger bar animation & nav tag doesn't work when I resize the browser width. But when I refresh the page it shows and works. So I need to refresh the page every time when I resize the window width to make it work.
I code with Bootstrap v5.2 and jQuery.I have struggled with this problem for a while. Please help me up.
Many Thanks.
/*navigation icon animation*/
let trigger = 'X';
jQuery(document).ready(function() {
$('#toggle-menu').click(function() {
trigger = 'X';
$(this).toggleClass('menu-is-active')
});
/* click outside of nav to trigger navigation icon animation*/
$(document).click(function() {
if (trigger == 'X') {
$("#toggle-menu").toggleClass();
trigger = 'ham';
}
});
$("nav").click(function(e) {
e.stopPropagation();
return false;
});
});
/*toggle Nav menu Background up & down*/
if ($(window).width() <= 768) {
$('#toggle-menu').on('click', function() {
if ($('.nav').is(':visible')) {
$('.nav').animate({
height: '0'
}, function() {
$(this).hide();
});
} else {
$('.nav').show();
$('.nav').animate({
height: '180'
});
}
});
}
/* Click outside of nav to close Toggle*/
if ($(window).width() <= 768) {
$(document).click(function() {
$(".nav").hide();
});
$("#toggle-menu").click(function(e) {
e.stopPropagation();
return false;
});
}
/*-- Nav Bar --*/
header a {
color: #ffffff;
text-decoration: none;
}
header a:focus,
a:hover {
color: #a7a7a7;
}
header a:active {
color: #b8b8b8;
}
header {
display: flex;
height: 40px;
justify-content: space-between;
align-items: center;
padding: 0px 10px;
position: relative;
z-index: 2;
}
.logo {
float: left;
cursor: pointer;
text-decoration: none;
}
.nav {
float: right;
}
.nav>li {
display: inline-block;
padding-right: 20px;
font-size: 0.9rem;
}
.nav>li:last-child {
padding-right: 10px;
}
.hover-underline-animation {
display: inline-block;
position: relative;
color: white;
text-decoration: none;
}
.hover-underline-animation:after {
content: '';
position: absolute;
width: 100%;
transform: scaleX(0);
height: 1.5px;
bottom: -3px;
left: 0;
background-color: #f0bc1f;
transform-origin: bottom right;
transition: transform 0.3s ease-out;
}
.hover-underline-animation:hover:after {
transform: scaleX(1);
transform-origin: bottom left;
}
.language {
text-decoration: none;
color: #ffffff;
}
.header-divider {
position: absolute;
border-top: 1.5px solid white;
width: 50%;
z-index: 2;
right: 0px;
top: 25px;
opacity: 0.3;
}
#media (max-width: 768px) {
.nav {
position: fixed;
width: 100%;
text-align: center;
display: none;
background-color: #d3d3d33f;
left: 0px;
top: 39px;
}
.nav li:hover {
background-color: #f0bc1f;
transition: ease-in-out;
}
.nav li a:hover {
color: #000000;
}
.nav>li {
display: block;
float: center;
padding: 8px 0px;
}
.nav>li:last-child {
border-bottom: none;
}
.hover-underline-animation {
display: block;
position: relative;
color: white;
text-decoration: none;
}
.hover-underline-animation:hover {
background-color: #f0bc1f;
}
.hover-underline-animation:after {
content: '';
position: absolute;
display: none;
}
/*--- logo ---*/
.logo {
float: left;
display: block;
cursor: pointer;
}
/*--- Navigation Burger Menu ---*/
#toggle-menu {
float: right;
display: block;
cursor: pointer;
margin-right: 20px;
}
#toggle-menu div {
width: 15px;
height: 15px;
position: relative;
}
#toggle-menu .bar {
padding: 0;
width: 25px;
height: 3px;
background-color: rgb(255, 255, 255);
display: block;
border-radius: 3px;
transition: all 0.4s ease-in-out;
position: absolute;
}
#toggle-menu span.bar1 {
top: 0px;
}
#toggle-menu span.bar2,
.bar3 {
top: 8px;
}
#toggle-menu span.bar4 {
top: 16px;
}
/*--- Burger Menu Animation---*/
#toggle-menu.menu-is-active .bar {
padding: 0;
width: 25px;
height: 3px;
background-color: rgb(255, 255, 255);
display: block;
border-radius: 3px;
transition: all 0.4s ease-in-out;
position: absolute;
}
#toggle-menu.menu-is-active span.bar1 {
top: 0px;
-webkit-transform: translateX(20px);
-moz-transform: translateX(20px);
transform: translateX(20px);
background-color: transparent;
}
#toggle-menu.menu-is-active span.bar4 {
top: 16px;
-webkit-transform: translateX(-20px);
-moz-transform: translateX(-20px);
transform: translateX(-20px);
background-color: transparent;
}
#toggle-menu.menu-is-active span.bar2 {
top: 8px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
transform: rotate(45deg);
}
#toggle-menu.menu-is-active span.bar3 {
top: 8px;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
transform: rotate(-45deg);
}
}
<header class="container-fluid bg-dark">
CCH
<a id="toggle-menu">
<div id="barcontainer">
<span class="bar bar1"></span>
<span class="bar bar2"></span>
<span class="bar bar3"></span>
<span class="bar bar4"></span>
</div>
</a>
<ul class="nav">
<li>Home</li>
<li>About us</li>
<li>Service</li>
<li>Contact</li>
<li>Career</li>
<li>中文/En</li>
</ul>
</header>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
The issue with your current code is because you only check the window widths when the page loads, not when it resizes.
That being said you can make the code much more simple by toggling a class on the button. You can then use CSS transitions to animate the state of the menu based on the #media rules.
The only thing that's required in JS to make this work is to remove the class from the burger when the screen resizes in order to hide the menu once more.
jQuery($ => {
$('#toggle-menu').on('click', e => {
$(e.currentTarget).toggleClass('menu-is-active')
});
});
$(window).on('resize', () => {
$('#toggle-menu').removeClass('menu-is-active');
});
body {
background-color: #333;
}
header a {
color: #ffffff;
text-decoration: none;
}
header a:focus,
a:hover {
color: #a7a7a7;
}
header a:active {
color: #b8b8b8;
}
header {
display: flex;
height: 40px;
justify-content: space-between;
align-items: center;
padding: 0px 10px;
position: relative;
z-index: 2;
}
.logo {
float: left;
cursor: pointer;
text-decoration: none;
}
.nav {
float: right;
}
.nav.show {
display: block;
}
.nav>li {
display: inline-block;
padding-right: 20px;
font-size: 0.9rem;
}
.nav>li:last-child {
padding-right: 10px;
}
.hover-underline-animation {
display: inline-block;
position: relative;
color: white;
text-decoration: none;
}
.hover-underline-animation:after {
content: '';
position: absolute;
width: 100%;
transform: scaleX(0);
height: 1.5px;
bottom: -3px;
left: 0;
background-color: #f0bc1f;
transform-origin: bottom right;
transition: transform 0.3s ease-out;
}
.hover-underline-animation:hover:after {
transform: scaleX(1);
transform-origin: bottom left;
}
.language {
text-decoration: none;
color: #ffffff;
}
.header-divider {
position: absolute;
border-top: 1.5px solid white;
width: 50%;
z-index: 2;
right: 0px;
top: 25px;
opacity: 0.3;
}
#media (max-width: 768px) {
.nav {
position: fixed;
width: 100%;
text-align: center;
opacity: 0;
background-color: #d3d3d33f;
left: 0px;
top: 39px;
height: 0;
transition: height 0.25s, opacity 0.25s;
}
#toggle-menu.menu-is-active + ul.nav {
opacity: 1;
height: 200px;
}
.nav li:hover {
background-color: #f0bc1f;
transition: ease-in-out;
}
.nav li a:hover {
color: #000000;
}
.nav>li {
display: block;
float: center;
padding: 8px 0px;
}
.nav>li:last-child {
border-bottom: none;
}
.hover-underline-animation {
display: block;
position: relative;
color: white;
text-decoration: none;
}
.hover-underline-animation:hover {
background-color: #f0bc1f;
}
.hover-underline-animation:after {
content: '';
position: absolute;
display: none;
}
/*--- logo ---*/
.logo {
float: left;
display: block;
cursor: pointer;
}
/*--- Navigation Burger Menu ---*/
#toggle-menu {
float: right;
display: block;
cursor: pointer;
margin-right: 20px;
}
#toggle-menu div {
width: 15px;
height: 15px;
position: relative;
}
#toggle-menu .bar {
padding: 0;
width: 25px;
height: 3px;
background-color: rgb(255, 255, 255);
display: block;
border-radius: 3px;
transition: all 0.4s ease-in-out;
position: absolute;
}
#toggle-menu span.bar1 {
top: 0px;
}
#toggle-menu span.bar2,
.bar3 {
top: 8px;
}
#toggle-menu span.bar4 {
top: 16px;
}
/*--- Burger Menu Animation---*/
#toggle-menu.menu-is-active .bar {
padding: 0;
width: 25px;
height: 3px;
background-color: rgb(255, 255, 255);
display: block;
border-radius: 3px;
transition: all 0.4s ease-in-out;
position: absolute;
}
#toggle-menu.menu-is-active span.bar1 {
top: 0px;
-webkit-transform: translateX(20px);
-moz-transform: translateX(20px);
transform: translateX(20px);
background-color: transparent;
}
#toggle-menu.menu-is-active span.bar4 {
top: 16px;
-webkit-transform: translateX(-20px);
-moz-transform: translateX(-20px);
transform: translateX(-20px);
background-color: transparent;
}
#toggle-menu.menu-is-active span.bar2 {
top: 8px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
transform: rotate(45deg);
}
#toggle-menu.menu-is-active span.bar3 {
top: 8px;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
transform: rotate(-45deg);
}
}
<header class="container-fluid bg-dark">
CCH
<a id="toggle-menu">
<div id="barcontainer">
<span class="bar bar1"></span>
<span class="bar bar2"></span>
<span class="bar bar3"></span>
<span class="bar bar4"></span>
</div>
</a>
<ul class="nav">
<li>Home</li>
<li>About us</li>
<li>Service</li>
<li>Contact</li>
<li>Career</li>
<li>中文/En</li>
</ul>
</header>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
Here's a working example in jsFiddle - it's easier to see the resize logic working here as you can drag the frames.

My dropdown menu keeps appearing when I don't want it too

So, I got a navigation bar with dropdown menus. Whenever I move my cursor where the drop-down menu is hidden, it opens, and I need to disable that without disabling the drop-down menu as a whole. Any tips on how to do that?
If you want to go ahead and look at the latest version of my website can be found below.
Here's the link: https://p1ayerone.github.io/
And here's the CSS code:
#import url('https://fonts.googleapis.com/css2?family=Roboto:wght#300&display=swap');
:root {
--background: rgba(54, 57, 63, .85);
}
*,
*::before,
*::after {
margin: 0px;
padding: 0px;
box-sizing: inherit;
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
background: url(../../img/bg/bg.png) fixed center;
background-attachment: fixed;
background-position: center;
font-family: 'Roboto', sans-serif;
font-weight: 400;
box-sizing: border-box;
color: silver;
}
.content {
height: 200vh;
background-size: cover;
display: grid;
place-items: center;
}
/* navigation styles start here */
header {
z-index: 999;
width: 100%;
right: 0%;
top: 0%;
position: fixed;
}
.logo {
margin: 0;
color: silver;
list-style: none;
}
.img-logo {
margin-right: 15px;
padding-top: 8px;
margin-bottom: -10px;
}
.nav-toggle {
display: none;
}
.nav-toggle-label {
position: absolute;
top: 0;
left: 0;
margin-left: 1em;
height: 100%;
display: flex;
align-items: left;
margin-top: 3.5%;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
display: block;
background: white;
height: 2px;
width: 2em;
border-radius: 2px;
position: relative;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after {
content: '';
position: absolute;
}
.nav-toggle-label span::before {
bottom: 7px;
}
.nav-toggle-label span::after {
top: 7px;
}
.nav {
text-transform: uppercase;
font-size: 1.2rem;
background: var(--background);
padding-bottom: 1.7%;
}
.nav::after {
content: "";
display: table;
clear: both;
}
.nav-main {
float: right;
list-style: none;
margin-bottom: -21px;
padding-bottom: -15px;
}
.nav-main-item {
display: inline-block;
width: 12rem;
position: relative;
}
li {
list-style: none;
}
.nav-main a {
text-align: center;
padding: 1rem;
color: #eee;
text-decoration: none;
display: block;
}
.nav-main-item a:hover {
background-color: gray;
}
.nav-main-item:hover > * {
opacity: 1;
margin: 0;
}
.navi-main-item {
opacity: 0;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.more-main-item {
opacity: 0;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.nav-toggle:checked ~ nav {
transform: scale(1,1);
}
.nav-toggle:checked ~ nav a {
opacity: 1;
transition: opacity 250ms ease-in-out 250ms;
}
.destiny-intro-p {
padding-left: 100px;
font-size: 1.3rem;
}
.destiny-intro-h1 {
font-size: 3rem;
}
.body-block {
background-color: black;
color: white;
padding-bottom: 6%;
}
#media screen and (min-width: 800px) {
.nav-toggle-label {
display: none;
}
header {
z-index: 999;
width: 100%;
right: 0%;
top: 0%;
position: fixed;
}
.logo {
margin: 0;
color: silver;
list-style: none;
padding-top: 15;
}
.nav {
text-transform: uppercase;
font-size: 1.2rem;
background: var(--background);
}
.nav::after {
content: "";
display: table;
clear: both;
}
.nav-main {
float: right;
list-style: none;
}
.nav-main-item {
display: inline-block;
width: 10rem;
position: relative;
}
.nav-main a {
text-align: center;
padding: 1rem;
color: white;
text-decoration: none;
display: block;
}
.nav-main-item a:hover {
background-color: silver;
}
.nav-main-item:hover > * {
opacity: 1;
margin: 0;
}
.navi-main-item {
opacity: 0;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.Discord {
float: right;
}
.gif-Destiny {
width: 200px;
float: right;
color: silver;
}
.Zachary {
color: black;
text-decoration: none;
}
.introduction {
color: black;
}
.footer {
background-color: #1F2E4B;
color: white;
text-align: center;
font-size: 20px;
float: center;
margin-top: 100%;
}
.CbZD{
color: #00FFFF;
font-size: 30px;
}
}
.Discord {
float: right;
}
.img-Destiny {
padding-top: 0px;
width: 300px;
float: right;
color: black;
}
.Zachary {
color: black;
text-decoration: none;
}
.introduction {
color: black;
}
.footer {
background-color: #1F2E4B;
color: white;
text-align: center;
font-size: 20px;
float: center;
}
.CbZD{
color: #00FFFF;
font-size: 30px;
}
/* Videos */
.tse {
color: #07FC1B;
text-align: center;
}
/* Characters */
.img-TBG {
background-color: white;
color: black;
float: left;
width: 300px;
height: 500px;
}
/* Applications */
.silver-box {
background-color: silver;
color: black;
height: 1400px;
width: 640px;
}
/* About Me */
.abtme {
width: 50%;
margin: 0 auto;
}
/* Links */
.contact-me {
color: silver;
}
.gmail-footer {
color: silver;
}
.twitter-footer {
color: silver;
}
/* Contact */
.contact-title {
margin-top: 100px;
color: white;
text-transform: uppercase;
transition: all 4s ease-in-out;
}
.contact-title h1 {
font-size: 32px;
line-height: -10px;
}
.contact-title h2 {
font-size: 16px;
}
form {
margin-top: 50px;
transition: all 4s ease-in-out;
}
.form-control {
width: 600px;
background: var(--background);
border: none;
outline: none;
border-bottom: 1px solid gray;
color: white;
font-size: 18px;
margin-bottom: 16px;
}
input {
height: 45px;
}
form .submit {
background: #ff5722;
border-color: transparent;
color: #fff;
font-size: 20px;
font-weight: bold;
letter-spacing: 2px;
height: 50px;
margin-top: 20px;
}
form .submit:hover {
background-color: #f44336;
cursor: pointer;
}
Instead of using opacity:0 and opacity:1 to display the dropdown, you can use display:none and display:inline-block. When using opacity, it doesn't remove the element from the page, which is why the dropdown would appear when hovering in that area.
Can read more about this here https://magnusbenoni.com/difference-between-display-visibility-opacity/
.nav-main-item:hover > .navi-main-item {
display: inline-block;
margin: 0;
}
.navi-main-item {
display: none;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}

Why can I click the li when the navbar isn't showed?

Ok so I have a problem with my navbar on mobile. It is hidden and it displays only when I press the bar (toggler). The problem is: if I press on the screen when the navbar isn't displayed it still goes to the links, even if I can't see the li's.
I want to keep the same navbar but I don't want to acces the links when it is closed.
If its possible please tell me how to solve it and the problems of my navbar
This is my code:
.banner {
margin: 0px;
position: relative;
width: 100%;
height: 100vh;
background-size: cover;
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.6)), url(../img/pozabackground-home2.jpg);
background-position: center;
box-shadow: 1px 2px 4px 0px #00000075 !important;
background-attachment: fixed;
}
.navigatie {
background-color: transparent;
width: 100%;
position: fixed;
z-index: 99;
margin: 0px;
padding: 0px;
}
.logo {
float: left;
padding: 8px;
margin-left: 40px;
margin-top: 8px;
}
.navbar-brand {
color: white !important;
}
.navbar-brand img {
width: auto;
height: 100px;
margin: -32px 0px -25px 0px;
}
nav ul {
float: right;
list-style-type: none;
padding-top: 5px;
margin-right: 20px;
}
nav ul li {
float: left;
}
nav ul li:not(:first-child) {
margin-left: 48px;
}
nav ul li:last-child {
margin-right: 24px;
}
nav ul li a {
display: inline-block;
outline: none;
color: #fff;
text-transform: uppercase;
text-decoration: none;
font-size: 13px;
letter-spacing: 1.1px;
font-weight: 600;
}
nav ul li a:hover {
color: #fff;
text-decoration: underline;
}
/* FUNDAL JS */
.fundal {
background: #104f47 !important;
box-shadow: 1px 2px 4px 0px #00000075 !important;
}
.fundal .nav-btn {
background-color: #104f47;
border-radius: 50%;
box-shadow: 1px 2px 4px 0px #00000075;
}
.fundal .nav-btn i {
background: #fff;
border-radius: 2px;
}
#nav:checked+.nav-btn {
transform: rotate(45deg);
background-color: #104f47;
}
#nav:checked+.nav-btn i {
background: #fff;
transition: transform 0.2s ease;
}
#nav:checked+.nav-btn i:nth-child(1) {
transform: translateY(6px) rotate(180deg);
}
#nav:checked+.nav-btn i:nth-child(2) {
opacity: 0;
}
#nav:checked+.nav-btn i:nth-child(3) {
transform: translateY(-6px) rotate(90deg);
}
#nav:checked~.nav-wrapper {
z-index: 9990;
opacity: 1;
}
#nav:checked~.nav-wrapper ul li a {
opacity: 1;
transform: translateX(0);
}
.hidden {
display: none;
}
/* MEDIA SCREEN PTR TLF */
#media only screen and (max-width: 991px) {
.navigatie {
background-color: transparent;
width: 100%;
position: absolute;
;
z-index: 99;
margin: 0px;
padding: 0px;
}
.navbar-brand img {
height: 100px;
margin: -20px 0px 0px 0px;
}
.nav-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background: #fff;
opacity: 0;
transition: all 0.2s ease;
}
.nav-wrapper ul {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 100%;
}
.nav-wrapper ul li {
display: block;
float: none;
width: 100%;
text-align: right;
padding-top: 10px;
margin-bottom: 10px;
}
.nav-wrapper ul li:nth-child(1) a {
transition-delay: 0.2s;
}
.nav-wrapper ul li:nth-child(2) a {
transition-delay: 0.3s;
}
.nav-wrapper ul li:nth-child(3) a {
transition-delay: 0.4s;
}
.nav-wrapper ul li:nth-child(4) a {
transition-delay: 0.5s;
}
.nav-wrapper ul li:not(:first-child) {
margin-left: 0;
}
.nav-wrapper ul li a {
padding: 10px 24px;
opacity: 0;
color: #000;
font-size: 14px;
font-weight: 600;
letter-spacing: 1.2px;
transform: translateX(-20px);
transition: all 0.2s ease;
}
.nav-btn {
position: fixed;
right: 30px;
top: 28px;
display: block;
width: 48px;
height: 46px;
cursor: pointer;
z-index: 9999;
border-radius: 50%;
}
.nav-btn i {
display: block;
width: 20px;
height: 2px;
background: #fff;
border-radius: 2px;
margin-left: 14px;
}
.nav-btn i:nth-child(1) {
margin-top: 16px;
}
.nav-btn i:nth-child(2) {
margin-top: 4px;
opacity: 1;
}
.nav-btn i:nth-child(3) {
margin-top: 4px;
}
}
/* SCRIS DE LA BANNER */
.title {
position: absolute;
top: 47%;
left: 35%;
text-align: left;
transform: translate(-50%, -50%);
}
.title h1 {
color: #fff;
font-family: poppins;
font-size: 50px;
color: #f5f6f8;
padding-bottom: 20px;
}
.button button {
display: inline-block;
font-size: 12px;
text-transform: uppercase;
text-align: center;
padding: 13px 20px;
border: none;
color: white;
font-family: montserrat;
text-decoration: none;
transition: 0.6s ease;
background-color: #104f47;
box-shadow: 1px 2px 4px 0px #00000075;
outline: none;
}
.button button:hover {
background-color: #104f47;
color: white;
}
<div class="navigatie">
<nav>
<input type="checkbox" id="nav" class="hidden">
<label for="nav" class="nav-btn">
<i></i>
<i></i>
<i></i>
</label>
<div class="logo">
<a class="navbar-brand" href="index.php"><img src="./img/logoinainte.png"></a>
</div>
<div class="nav-wrapper">
<ul>
<li>Acasa</li>
<li>Despre</li>
<li>Servicii</li>
<li>Tarife</li>
<li>Contact</li>
</ul>
</div>
</nav>
</div>
<section class="banner">
<div class="container">
<div class="title">
<h1>Aspect curat <br>și îmbunătățit al <br>locuinței tale</h1>
<div class="button">
<button type="button">Sună acum!</button>
</div>
</div>
</div>
</section>
Could you tell me what is the problem?
You are using opacity. With opacity the element becomes invisible but it is still there. You have to set its display to none. And when the button is clicked you have to set its display to block.
.nav-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background: #fff;
display:none;
transition: all 0.2s ease;
}
#nav:checked ~ .nav-wrapper {
z-index: 9990;
display:block
}

Item appearing above another rather than to the left of it?

I have a navigation that's horizontally scrollable on mobile devices.
I'd like to add text that says '👉 Scroll' so folks know to do so.
I've set up the text to appear on mobile only but now when I add this next to my nav html it appears above the nav rather than to the left of it. Essentially I'd like the nav links to shift right and accommodate the text.
I'm a massive noob so apologies in advance and I really appreciate any help.
Thanks!
HTML
<nav class="site-nav">
<div class="site-nav-left-wrapper">
<div class="site-nav-left">
{{#if #site.logo}}
<a class="site-nav-logo" href="{{#site.url}}"><img src="{{#site.logo}}" alt="{{#site.title}}" /></a>
{{else}}
<a class="site-nav-logo" href="{{#site.url}}">{{#site.title}}</a>
{{/if}}
<div class="site-nav-content">
<div class="mobileShow">👉 Scroll</div>
{{#if #site.navigation}}{{navigation}}
{{/if}}
{{#is "post"}}
<span class="nav-post-title {{#unless #site.logo}}dash{{/unless}}">{{post.title}}</span>
{{/is}}
</div>
</div>
</div>
<div class="site-nav-right">
{{#if #site.secondary_navigation}}
{{navigation type="secondary"}}
{{else}}
<div class="social-links">
<i class="fab fa-instagram fa-xs"></i>
<i class="fas fa-rss fa-xs"></i>
</div>
{{/if}}
{{#if #labs.members}}
<a class="subscribe-button" href="#subscribe">Subscribe</a>
{{/if}}
</div>
CSS
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 1000;
background: #22003a;
}
.site-nav {
position: relative;
z-index: 100;
display: flex;
justify-content: space-between;
align-items: flex-start;
overflow: hidden;
height: 64px;
font-size: 1.3rem;
}
.site-nav-left-wrapper {
position: relative;
flex: 1 0 auto;
display: flex;
}
.site-header-background:not(.responsive-header-img) .site-nav-left-wrapper:after,
.site-nav-main .site-nav-left-wrapper:after {
content: "";
position: absolute;
top: 0;
z-index: 1000;
width: 40px;
height: 100%;
}
.site-header-background:not(.responsive-header-img) .site-nav-left-wrapper:after,
.site-nav-main .site-nav-left-wrapper:after {
right: 0;
}
.site-nav-left {
flex: 1 0 auto;
display: flex;
align-items: center;
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
margin-right: 10px;
padding: 10px 0 80px;
font-weight: 500;
letter-spacing: 0.2px;
text-transform: uppercase;
white-space: nowrap;
-ms-overflow-scrolling: touch;
}
.site-nav-left .nav li:last-of-type {
padding-right: 20px;
}
.site-nav-logo {
position: relative;
z-index: 100;
flex-shrink: 0;
display: inline-block;
margin-right: 32px;
padding: 12px 0;
color: #fff;
font-size: 1.7rem;
line-height: 1.8rem;
font-weight: bold;
letter-spacing: -0.5px;
text-transform: none;
}
.site-nav-logo:hover {
text-decoration: none;
}
.site-nav-logo img {
display: block;
width: auto;
height: 21px;
}
.site-home-header .site-nav-logo {
display: none;
}
.site-nav-content {
position: relative;
align-self: flex-start;
}
.nav {
position: absolute;
z-index: 1000;
display: flex;
margin: 0 0 0 -12px;
padding: 0;
list-style: none;
transition: all 1.0s cubic-bezier(0.19, 1, 0.22, 1);
}
.nav li {
display: block;
margin: 0;
padding: 0;
}
.nav li a {
font-family: 'Noto Sans', sans-serif;
font-weight: 700;
display: block;
padding: 12px 12px;
color: #ff0072;
transition: opacity 0.35s ease-in-out;
}
.nav li a:hover {
color: springgreen;
text-decoration: none;
}
.nav li a:before {
content: "";
position: absolute;
right: 100%;
bottom: 8px;
left: 12px;
height: 1px;
background: #fff;
transition: all 0.35s ease-in-out;
}
.nav li a:hover:before {
right: 12px;
}
.nav-post-title-active .nav {
visibility: hidden;
opacity: 0;
transform: translateY(-175%);
}
.nav-post-title {
visibility: hidden;
position: absolute;
top: 9px;
color: springgreen;
font-size: 1.7rem;
font-weight: 400;
text-transform: none;
opacity: 0;
transition: all 1.0s cubic-bezier(0.19, 1, 0.22, 1);
transform: translateY(175%);
}
.nav-post-title.dash {
left: -25px;
}
.nav-post-title.dash:before {
content: "– ";
opacity: 0.5;
}
.nav-post-title-active .nav-post-title {
visibility: visible;
opacity: 1;
transform: translateY(0);
}
.site-nav-right {
flex: 0 1 auto;
font-size: 1.7em;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 10px 0;
height: 64px;
}
.site-nav-right .nav {
position: relative;
margin: 0;
}
.site-nav-right .nav a {
white-space: nowrap;
}
.site-nav-right .nav a:before {
display: none;
}
.site-nav-right .nav li:last-of-type a {
margin-right: -12px;
}
.social-links {
flex-shrink: 0;
display: flex;
align-items: center;
}
.social-link {
display: inline-block;
margin: 0;
padding: 10px;
}
.social-link:hover {
fill: springgreen;
}
.social-link svg:hover {
fill: springgreen;
}
.social-link svg {
height: 1.8rem;
fill: azure;
}
.social-link-fb svg {
height: 1.6rem;
}
.social-link-wb svg {
height: 1.6rem;
}
.social-link-wb svg path {
stroke: #fff;
}
.social-link-rss svg {
height: 1.9rem;
}
.subscribe-button {
display: block;
margin: 0 0 0 10px;
padding: 4px 10px;
border: #fff 1px solid;
color: #fff;
line-height: 1em;
border-radius: 10px;
opacity: 0.8;
}
.subscribe-button:hover {
text-decoration: none;
opacity: 1;
}
.site-nav-right .nav + .subscribe-button {
margin-left: 24px;
}
.rss-button {
padding: 10px 8px;
opacity: 0.8;
}
.rss-button:hover {
opacity: 1;
}
.rss-button svg {
margin-bottom: 1px;
height: 2.1rem;
fill: #fff;
}
/* Special behaviors for home navigation */
.home-template .site-nav-main {
z-index: 100;
}
.home-template .site-nav-main .site-nav {
opacity: 0;
transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1) 0s;
}
.home-template .site-nav-main .fixed-nav-active {
opacity: 1;
transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1) 0.05s;
}
#media (max-width: 700px) {
.site-home-header .site-nav {
margin-left: -5vw;
}
.site-nav-main {
padding-right: 0;
padding-left: 0;
}
.site-nav-left {
margin-right: 0;
padding-left: 5vw;
}
.site-nav-right {
display: none;
}
}```
Hello I3rett could you try putting this in an < a > tag, the div tag is not inline :D
-> If that doesn't work, try putting the < a > element inside site-nav-logo/nav-left