No matter what I do, I can't seem to get the active navigation to work on my site. Here's the URL: http://helloarchie.blue
As far as I can tell, the URLs are correct (bar categories) but I'm getting confused with the navigation CSS.
Here's the HTML:
<nav class="cbp-hsmenu-wrapper" id="cbp-hsmenu-wrapper">
<div class="cbp-hsinner">
<ul class="cbp-hsmenu">
<li><span class="navi">01</span> Home</li>
<li><a class="arrow" href="#"><span class="navi">02</span> Categories</a>
<ul class="cbp-hssubmenu">
<li><span>Personal</span></li>
<li><span>Informative</span></li>
<li><span>Guides</span></li>
<li><span>Reviews</span></li>
<li><span>#fashionfriday</span></li>
<li><span>Humour</span></li>
</ul>
</li>
<li><span class="navi">03</span> About</li>
<li><span class="navi">04</span> Archives</li>
</ul>
</div>
</nav>
CSS:
.cbp-hsmenu-wrapper .cbp-hsmenu {
width: 100%;
margin: 0 auto;
text-align: center;
background: #2fdcce;
position: fixed;
}
.cbp-hsmenu > li {
display: inline-block;
margin-left: 0em;
}
.cbp-hsmenu > li:after {
content: "";
padding: 0 10px;
color: #383d3d;
display: inline-block;
}
.cbp-hsmenu > li:last-child:after {
content: "";
color: #383d3d;
display: inline-block;
}
.cbp-hsmenu > li:first-child {
margin-left: 3em;
}
.cbp-hsmenu > li > a {
color: #fff;
font-family: 'brandon-grotesque', arial, sans-serif;
font-weight: 700;
text-transform: uppercase;
font-size: 0.85em;
line-height: 3.5em;
display: inline-block;
position: relative;
z-index: 10000;
outline: none;
letter-spacing: 0.1em;
}
.cbp-hsmenu > li > a.active { color: #1dbbae; }
.cbp-hsmenu > li.log { margin-right: 160px; font-size: 1.3em; font-weight: 900; }
.cbp-hssubmenu {
position: absolute;
left: 0;
top: 100%;
width: 100%;
z-index: 0;
text-align: center;
visibility: hidden;
background: #fff;
}
.cbp-hssubmenu:before,
.cbp-hssubmenu:after {
content: " ";
display: table;
}
.cbp-hssubmenu:after {
clear: both;
}
.cbp-hssubmenu > li {
width: 16.2%;
display: inline-block;
vertical-align: top;
opacity: 0;
-webkit-transition: opacity 0.1s 0s;
-moz-transition: opacity 0.1s 0s;
transition: opacity 0.1s 0s;
}
.cbp-hssubmenu > li a {
display: block;
text-align: center;
color: #383A3d;
font-family: 'brandon-grotesque', arial, sans-serif;
font-weight: 500;
text-transform: uppercase;
font-size: 0.7em;
outline: none;
padding: 1em 0.5em 0.5em 0.5em;
letter-spacing: 0.3em;
}
.cbp-hssubmenu > li a span {
display: block;
min-height: 0.8em;
padding-bottom: 5px;
}
.cbp-hsmenu > li.cbp-hsitem-open .cbp-hssubmenu {
z-index: 1000;
visibility: visible;
}
.cbp-hsmenu > li.cbp-hsitem-open .cbp-hssubmenu > li {
opacity: 1;
-webkit-transition: opacity 0.5s 0.1s;
-moz-transition: opacity 0.5s 0.1s;
transition: opacity 0.5s 0.1s;
}
JS:
jQuery(function() {
jQuery('.cbp-hsmenu > li > a').each(function() {
var href = jQuery(this).find('a').attr('href');
if (href === window.location.pathname) {
jQuery(this).addClass('active');
}
});
});
Related
So I have a dot navigation but when I click one time under the third dot or at the left of the three dots there is a redish box highlighting, I already tried user-select: none or even the ::selection property and put the background color to transparent but the highlighting still remains, would there have any other css property or method that could cancel that?
$(document).ready(() => {
document.getElementById("event").addEventListener("click", e => {
const allItems = $('#event > li');
for (let i = 0; i < allItems.length; i++) {
allItems[i].classList.remove("is-active");
}
e.target.classList.add("is-active");
})
});
html{
user-select: none;
}
::selection{
background-color: transparent;
}
.is-active{
transform: scale(1.2);
background: red !important;
}
#vertical-nav {
position: fixed;
z-index: 3;
right: 15px;
bottom: 0;
margin: auto 0;
height: 100%;
display: flex;
align-items: center;
}
#vertical-nav ul > li {
background: black;
width: 13px;
height: 13px;
margin-bottom: 15px;
border-radius: 50%;
transition: 0.4s ease-in-out;
}
#vertical-nav ul > li a {
display: none;
float: right;
color: black;
margin-right: 13px;
margin-top: -5px;
font-size: 10px;
transition: 0.4s ease-in-out;
padding: 3px;
border-radius: 10px;
}
#vertical-nav ul > li:hover {
cursor: pointer;
transform: scale(1.2);
background: lightgrey;
}
#vertical-nav ul > li:hover a {
//opacity: 1;
}
#vertical-nav ul > li:hover a {
//opacity: 1;
}
ul > li {
list-style-type: none;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<nav id="vertical-nav">
<ul id="event">
<li>
<a data-number="1">Home</a>
</li>
<li>
<a data-number="2">About</a>
</li>
<li>
<a data-number="3">Contact</a>
</li>
</ul>
</nav>
Because you are adding the event listener to the whole container. You should target only the bullet. Since you are using jQuery you can also simplify your code:
$(document).ready(() => {
$("#event > li").click(function() {
$('#event > li').removeClass('is-active')
$(this).addClass("is-active");
})
});
html {
user-select: none;
}
::selection {
background-color: transparent;
}
.is-active {
transform: scale(1.2);
background: red !important;
}
#vertical-nav {
position: fixed;
z-index: 3;
right: 15px;
bottom: 0;
margin: auto 0;
height: 100%;
display: flex;
align-items: center;
}
#vertical-nav ul>li {
background: black;
width: 13px;
height: 13px;
margin-bottom: 15px;
border-radius: 50%;
transition: 0.4s ease-in-out;
}
#vertical-nav ul>li a {
opacity: 0;
float: right;
color: black;
margin-right: 13px;
margin-top: -5px;
font-size: 10px;
transition: 0.4s ease-in-out;
padding: 3px;
border-radius: 10px;
}
#vertical-nav ul>li:hover {
cursor: pointer;
transform: scale(1.2);
background: lightgrey;
}
#vertical-nav ul>li:hover a {
//opacity: 1;
}
#vertical-nav ul>li:hover a {
//opacity: 1;
}
ul>li {
list-style-type: none;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<nav id="vertical-nav">
<ul id="event">
<li>
<a data-number="1">Home</a>
</li>
<li>
<a data-number="2">About</a>
</li>
<li>
<a data-number="3">Contact</a>
</li>
</ul>
</nav>
Why not use jQuery all the way and not check the click on the UL
The issue with your code was that you add is-active to the UL when clicking next to the LI
$(document).ready(() => {
$("#event li").on("click", function() {
$(this).siblings().removeClass("is-active");
$(this).addClass("is-active");
})
});
html {
user-select: none;
}
::selection {
background-color: transparent;
}
.is-active {
transform: scale(1.2);
background: red !important;
}
#vertical-nav {
position: fixed;
z-index: 3;
right: 15px;
bottom: 0;
margin: auto 0;
height: 100%;
display: flex;
align-items: center;
}
#vertical-nav ul>li {
background: black;
width: 13px;
height: 13px;
margin-bottom: 15px;
border-radius: 50%;
transition: 0.4s ease-in-out;
}
#vertical-nav ul>li a {
opacity: 0;
float: right;
color: black;
margin-right: 13px;
margin-top: -5px;
font-size: 10px;
transition: 0.4s ease-in-out;
padding: 3px;
border-radius: 10px;
}
#vertical-nav ul>li:hover {
cursor: pointer;
transform: scale(1.2);
background: lightgrey;
}
#vertical-nav ul>li:hover a {
//opacity: 1;
}
#vertical-nav ul>li:hover a {
//opacity: 1;
}
ul>li {
list-style-type: none;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<nav id="vertical-nav">
<ul id="event">
<li>
<a data-number="1">Home</a>
</li>
<li>
<a data-number="2">About</a>
</li>
<li>
<a data-number="3">Contact</a>
</li>
</ul>
</nav>
simple css solution would be
a.is-active{
transform: scale(1.2);
background: red !important;
}
I have built a hamburger navigation that when clicked overlays the navigation elements on a full screen coloured background.
I have a couple of slight bugs which i cannot work out my mistake(s), or how to rectify them.
When you click the hamburger icon and the overlay is then displayed, if you then click anywhere on the background colour, the overlay closes. How can i keep the overlay visible unless a link or the close icon/button is clicked?
When you click a link, the overlay disappears (as expected) but then returns again after a split second. How can i stop this 'flashing' when clicked, so i can either keep the overlay showing until new page is loaded or hide the overlay once clicked.
$(document).ready(function() {
$(".menu-btn a").click(function() {
var scroll = $(window).scrollTop();
$(".overlay").fadeToggle(200);
$(this).toggleClass('btn-open').toggleClass('btn-close');
if ($(this).hasClass('btn-close')) {
$(".navbar").css("background-color", "grey");
} else if (scroll > 100) {
$(".navbar").css("background-color", "#CEB400");
}
});
$('.overlay').on('click', function() {
$(".overlay").fadeToggle(200);
$(".menu-btn a").toggleClass('btn-open').toggleClass('btn-close');
});
$('.menu a').on('click', function() {
$(".overlay").fadeToggle(200);
$(".menu-btn a").toggleClass('btn-open').toggleClass('btn-close');
});
});
$(document).ready(function() {
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll > 100) {
if ($('.overlay:visible').length == 0) {
$(".navbar").css("background-color", "#CEB400");
}
} else {
$(".navbar").css("background-color", "grey");
}
});
});
/* OPEN / CLOSE BTNS */
.menu-btn {
z-index: 999;
display: inline;
/* font-size: 32px; */
}
.menu-btn a {
display: flex;
text-decoration: none;
color: #ffffff;
/* safari hack */
align-items: center;
}
.btn-open:after {
color: inherit;
content: "\f394";
font-family: "Ionicons";
-webkit-transition: all .2s linear 0s;
-moz-transition: all .2s linear 0s;
-o-transition: all .2s linear 0s;
transition-property: all .2s linear 0s;
font-size: 40px;
}
.btn-open:hover:after {
color: inherit;
}
.btn-close:after {
color: inherit;
content: "\f2d7";
font-family: "Ionicons";
-webkit-transition: all .2s linear 0s;
-moz-transition: all .2s linear 0s;
-o-transition: all .2s linear 0s;
transition-property: all .2s linear 0s;
font-size: 40px;
}
.btn-close:hover:after {
color: #ffffff;
}
.template-home .btn-open:after,
.template-home .btn-open:hover:after,
.template-home .btn-close:after,
.template-home .btn-close:hover:after,
.template-home .menu-btn a span {
color: #ffffff!important;
}
/* OVERLAY */
.overlay {
position: fixed;
top: 0;
z-index: 99;
display: none;
overflow: auto;
width: 100%;
height: 100%;
background: rgba(209, 180, 0);
}
.overlay .menu {
margin: 150px 20px;
/* width: 80%; */
}
.overlay .menu ul {
margin: 0;
padding: 0;
width: 100%;
}
.overlay .menu ul li {
float: left;
padding: 6px 0 0 0;
width: 100%;
list-style: none;
text-align: left;
text-transform: uppercase;
}
.overlay .menu ul li#social {
width: 100%;
margin-top: 50px;
}
.overlay .menu ul li a {
color: #d1b400;
font-weight: 300;
font-size: 20px;
font-family: 'Old Standard TT', serif;
}
.overlay .menu ul li#social a {}
.overlay .menu ul ul {
margin-top: 20px;
}
.overlay .menu ul ul li {
position: relative;
float: none;
margin: 10px 0;
width: 100%;
border: 0;
}
.overlay .menu ul ul li a {
color: #fff;
text-transform: capitalize;
font-weight: 300;
font-size: 30px;
}
.overlay .menu ul ul li a:hover {
color: #000000;
}
/* RESPONSIVE */
#media screen and (max-width: 768px) {
.overlay .menu ul li {
float: none;
margin-bottom: 25px;
width: 100%;
}
.overlay .menu ul li:last-child {
border: 0;
}
.overlay .menu ul ul {
margin-top: 20px;
}
.menu-btn {
right: 25px;
}
}
.allexamples {
position: absolute;
bottom: 0;
font-size: 18px;
font-weight: bold;
width: 100%;
text-align: center;
background: #e9e9e9;
padding: 20px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
color: #333;
position: fixed;
}
.menu-social {
display: inline-block;
margin: 0 .4em;
}
.menu-social a {
width: 44px;
height: 44px;
padding: 0;
background-image: url("../img/cd-socials.svg");
background-repeat: no-repeat;
/* image replacement */
overflow: hidden;
text-indent: 100%;
white-space: nowrap;
}
.menu-social .menu-facebook a {
background-position: 0 0;
}
.menu-social .menu-instagram a {
background-position: -44px 0;
}
.menu-social .menu-dribbble a {
background-position: -88px 0;
}
.menu-social .menu-twitter a {
background-position: -132px 0;
}
.overlay .menu ul ul li.description {
padding: 0px 0 10px 0px;
}
.overlay .menu ul ul li.description span {
color: #000000;
font-size: 13px;
font-weight: 300;
text-transform: none;
}
p.tel,
p.email {
margin: 0 0 3px 0;
}
p.tel a {
color: #fff!important;
font-weight: 300!important;
font-size: 20px!important;
letter-spacing: 1px;
}
p.email a {
color: #fff!important;
font-weight: 300!important;
font-size: 20px!important;
text-transform: none;
}
.menu-btn a span {
font-size: 16px;
color: #ffffff;
/* line-height: 18px; */
font-weight: 600;
position: relative;
/* top: -5px; */
right: 10px;
}
.navbar-text div {
display: inline-block;
color: #ffffff;
font-size: 16px;
font-weight: 600;
}
.header-contact svg {
margin-left: 10px;
font-size: 22px;
}
.header-contact {
margin-right: 75px;
}
.header-contact a {
color: #ffffff;
}
.header-contact {
font-weight: 600!important;
font-size: 16px!important;
}
.navbar {
-webkit-transition: background-color 500ms ease-in-out;
-ms-transition: background-color 500ms ease-in-out;
transition: background-color 500ms ease-in-out;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<header>
<nav class="navbar fixed-top" style="background-color: grey;">
<div class="container">
<a class="navbar-brand" href="#">
<img src="img/pb-white.png" width="30" height="30" alt="">
</a>
<span class="navbar-text">
<div class="menu-btn">
<a class="btn-open" href="javascript:void(0)"><span>MENU</span></a>
</div>
</span>
</div>
</nav>
</header>
<div class="overlay">
<div class="menu">
<div class="container">
<ul>
<li>
<ul>
<li>Heading</li>
<li class="description"><span>Point, Point, Point, Point</span></li>
<li>Heading</li>
<li class="description"><span>Point, Point, Point, Point</span></li>
<li>Heading</li>
<li class="description"><span>Point, Point, Point, Point</span></li>
<li>Heading</li>
<li class="description"><span>Point, Point, Point, Point</span></li>
<li>Heading</li>
<li class="description"><span>Point, Point, Point, Point</span></li>
</ul>
</li>
<li>
<ul>
<li>Heading</li>
<li>Heading</li>
<li>Heading</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div style="height:2000px;"></div>
I currently have my work on a codepen here: https://codepen.io/whitinggg/pen/bLzxGG
To solve both your problems :
You need to remove the onClick event of your overlay, I.E. those lines :
$('.overlay').on('click', function () {
$(".overlay").fadeToggle(200);
$(".menu-btn a").toggleClass('btn-open').toggleClass('btn-close');
});
This will stop triggering event when you click on overlay.
Your first issue is then fixed, and your second issue was that by clicking on a link, you also click on the overlay which contains the link, so the event was triggered twice, and your overlay fade out and in, creating the blink effect.
Just remove this line of code from the script
$('.overlay').on('click', function() {
$(".overlay").fadeToggle(200);
$(".menu-btn a").toggleClass('btn-open').toggleClass('btn-close');
});
Currently my site has a transparent navbar when on scroll will change to full colour. The issue i am having is that the navbar also switches colour when the page is scrolled on the fullscreen navigation.
How can i stop the navbar switching colour when the fullscreen navigation is open? Would i need to change me JS?
$(document).ready(function() {
$(".menu-btn a").click(function() {
$(".overlay").fadeToggle(200);
$(this).toggleClass('btn-open').toggleClass('btn-close');
});
$('.overlay').on('click', function() {
$(".overlay").fadeToggle(200);
$(".menu-btn a").toggleClass('btn-open').toggleClass('btn-close');
});
$('.menu a').on('click', function() {
$(".overlay").fadeToggle(200);
$(".menu-btn a").toggleClass('btn-open').toggleClass('btn-close');
});
});
$(document).ready(function() {
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll > 100) {
$(".navbar").css("background-color", "#dedede");
} else {
$(".navbar").css("background-color", "transparent");
}
})
});
body {
background: black;
}
.menu-btn {
z-index: 999;
display: inline;
font-size: 32px;
}
.menu-btn a {
display: inline-block;
text-decoration: none;
/* safari hack */
}
.btn-open:after {
color: #fff;
content: "\f394";
font-family: "Ionicons";
-webkit-transition: all .2s linear 0s;
-moz-transition: all .2s linear 0s;
-o-transition: all .2s linear 0s;
transition-property: all .2s linear 0s;
}
.btn-open:hover:after {
color: #ffffff;
}
.btn-close:after {
color: #fff;
content: "\f2d7";
font-family: "Ionicons";
-webkit-transition: all .2s linear 0s;
-moz-transition: all .2s linear 0s;
-o-transition: all .2s linear 0s;
transition-property: all .2s linear 0s;
}
.btn-close:hover:after {
color: #ffffff;
}
/* OVERLAY */
.overlay {
position: fixed;
top: 0;
z-index: 99;
display: none;
overflow: auto;
width: 100%;
height: 100%;
background: rgba(209, 180, 0, 0.96);
}
.overlay .menu {
margin: 15% auto;
width: 80%;
}
.overlay .menu ul {
margin: 0;
padding: 0;
width: 100%;
}
.overlay .menu ul li {
float: left;
padding: 6px 0 0 0;
width: 50%;
list-style: none;
text-align: left;
text-transform: uppercase;
}
.overlay .menu ul li#social {
width: 100%;
margin-top: 50px;
}
.overlay .menu ul li a {
color: #d1b400;
font-weight: 300;
font-size: 20px;
font-family: 'Old Standard TT', serif;
}
.overlay .menu ul li#social a {}
.overlay .menu ul ul {
margin-top: 20px;
}
.overlay .menu ul ul li {
position: relative;
float: none;
margin: 0;
width: 100%;
border: 0;
}
.overlay .menu ul ul li a {
color: #fff;
text-transform: capitalize;
font-weight: 300;
font-size: 30px;
}
.overlay .menu ul ul li a:hover {
color: #000000;
}
/* RESPONSIVE */
#media screen and (max-width: 768px) {
.overlay .menu ul li {
float: none;
margin-bottom: 25px;
width: 100%;
}
.overlay .menu ul li:last-child {
border: 0;
}
.overlay .menu ul ul {
margin-top: 20px;
}
.menu-btn {
right: 25px;
}
}
.allexamples {
position: absolute;
bottom: 0;
font-size: 18px;
font-weight: bold;
width: 100%;
text-align: center;
background: #e9e9e9;
padding: 20px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
color: #333;
position: fixed;
}
.menu-social {
display: inline-block;
margin: 0 .4em;
}
.menu-social a {
width: 44px;
height: 44px;
padding: 0;
background-image: url("../img/cd-socials.svg");
background-repeat: no-repeat;
/* image replacement */
overflow: hidden;
text-indent: 100%;
white-space: nowrap;
}
.menu-social .menu-facebook a {
background-position: 0 0;
}
.menu-social .menu-instagram a {
background-position: -44px 0;
}
.menu-social .menu-dribbble a {
background-position: -88px 0;
}
.menu-social .menu-twitter a {
background-position: -132px 0;
}
.overlay .menu ul ul li.description {
padding: 0px 0 10px 0px;
}
.overlay .menu ul ul li.description span {
color: #000000;
font-size: 13px;
font-weight: 300;
text-transform: none;
}
p.tel,
p.email {
margin: 0 0 3px 0;
}
p.tel a {
color: #fff!important;
font-weight: 300!important;
font-size: 20px!important;
letter-spacing: 1px;
}
p.email a {
color: #fff!important;
font-weight: 300!important;
font-size: 20px!important;
text-transform: none;
}
.menu-btn a span {
font-size: 18px;
color: #ffffff;
line-height: 18px;
font-weight: 600;
position: relative;
top: -5px;
right: 5px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<header>
<nav class="navbar fixed-top">
<div class="container">
<a class="navbar-brand" href="#">
<img src="img/pb-white.png" width="30" height="30" alt="">
</a>
<span class="navbar-text">
<div class="menu-btn">
<a class="btn-open" href="javascript:void(0)">
<span>MENU</span>
</a>
</div>
</span>
</div>
</nav>
</header>
<div class="overlay">
<div class="menu">
<div class="container">
<ul>
<li>
<ul>
<li>Branding</li>
<li class="description"><span>Brand Development, Logos, Point, Point</span></li>
<li>Digital</li>
<li class="description"><span>Website Design, Website Development, Point, Point</span></li>
<li>Print</li>
<li class="description"><span>Business Cards, Leaflets, Point, Point</span></li>
<li>Packaging</li>
<li class="description"><span>Point, Point, Point, Point</span></li>
<li>Infographics</li>
<li class="description"><span>Point, Point, Point, Point</span></li>
</ul>
</li>
<li>
<ul>
<li>About</li>
<li class="description"><span>About Company</span></li>
<li>Work</li>
<li class="description"><span>Examples & Case Studies of our work</span></li>
<li>Contact</li>
<li class="description"><span>Get in touch with us to get your project started</span></li>
</ul>
</li>
<li id="social">
<ul class="contact">
<p class="email">info#company.com</p>
<p class="tel">01234 566545</p>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div style="height:2000px;"></div>
https://codepen.io/whitinggg/pen/bLzxGG
You can stop the navbar switching color when the fullscreen navigation by small editing in your script like this
change your script like this
$(document).ready(function () {
$(".menu-btn a").click(function () {
var scroll = $(window).scrollTop();
$(".overlay").fadeToggle(200);
$(this).toggleClass('btn-open').toggleClass('btn-close');
if( $(this).hasClass('btn-close') ) {
$(".navbar").css("background-color", "transparent");
}
else if( scroll > 100) {
$(".navbar").css("background-color", "#dedede");
}
});
$('.overlay').on('click', function () {
$(".overlay").fadeToggle(200);
$(".menu-btn a").toggleClass('btn-open').toggleClass('btn-close');
});
$('.menu a').on('click', function () {
$(".overlay").fadeToggle(200);
$(".menu-btn a").toggleClass('btn-open').toggleClass('btn-close');
});
});
$(document).ready(function() {
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll > 100) {
if($('.overlay:visible').length == 0) {
$(".navbar").css("background-color", "#dedede");
}
} else {
$(".navbar").css("background-color", "transparent");
}
});
});
You may consider adding an !important to the background style in order to always keep it transparent:
.navbar.fixed-top {
background:transparent!important;
}
I'm creating a page with multiple slide out menus. Eventually, there will be one on the right left and bottom. Currently, I'm have a few issues.
The content div is not moving to the right when the menu is selected. The menu icon moves, but the div doesn't move.
I'd like to have them both visible at the same time, but instead of appending the appropriate open/close class to the body, my js is changing the class.
/*
Slidemenu
*/
(function() {
var $body = document.body,
$left_menu_trigger = $body.getElementsByClassName('left-menu-trigger')[0];
if ( typeof $left_menu_trigger !== 'undefined' ) {
$left_menu_trigger.addEventListener('click', function() {
$body.className = ( $body.className == 'left-menu-active' )? '' : 'left-menu-active';
});
}
}).call(this);
(function() {
var $body = document.body,
$right_menu_trigger = $body.getElementsByClassName('right-menu-trigger')[0];
if ( typeof $right_menu_trigger !== 'undefined' ) {
$right_menu_trigger.addEventListener('click', function() {
$body.className = ( $body.className == 'right-menu-active' )? '' : 'right-menu-active';
});
}
}).call(this);
// Create the Google Map…
var map = new google.maps.Map(d3.select("#map").node(), {
zoom: 8,
center: new google.maps.LatLng(43.0756, -70.7606),
mapTypeId: google.maps.MapTypeId.TERRAIN,
disableDefaultUI: true
});
#import url(http://fonts.googleapis.com/css?family=Oxygen:400,700);
/*
Fonts
*/
#font-face {
font-family: 'ico';
src: url("data:application/octet-stream;base64,d09GRgABAAAAAA3MABAAAAAAFdAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABoAAAAcZZJr3kdERUYAAAGIAAAAHwAAACAANgAGT1MvMgAAAagAAABHAAAAVj4nWUhjbWFwAAAB8AAAAEwAAAFW0CkD5WN2dCAAAAI8AAAAFAAAABwG1/8IZnBnbQAAAlAAAAT5AAAJkYoKeDtnYXNwAAAHTAAAAAgAAAAIAAAAEGdseWYAAAdUAAAETwAABla173lDaGVhZAAAC6QAAAAzAAAANv9VQE9oaGVhA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OLEmARQrLbA8LLEIBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEmARQrLbA9LLAwKy6xJgEUKy2wPiywMSshIyAgPLAEI0IjOLEmARQrsARDLrAmKy2wPyywABUgR7AAI0KyAAEBFRQTLrAsKi2wQCywABUgR7AAI0KyAAEBFRQTLrAsKi2wQSyxAAEUE7AtKi2wQiywLyotsEMssAAWRSMgLiBGiiNhOLEmARQrLbBELLAII0KwQystsEUssgAAPCstsEYssgABPCstsEcssgEAPCstsEgssgEBPCstsEkssgAAPSstsEossgABPSstsEsssgEAPSstsEwssgEBPSstsE0ssgAAOSstsE4ssgABOSstsE8ssgEAOSstsFAssgEBOSstsFEssgAAOystsFIssgABOystsFMssgEAOystsFQssgEBOystsFUssgAAPistsFYssgABPistsFcssgEAPistsFgssgEBPistsFkssgAAOistsFossgABOistsFsssgEAOistsFwssgEBOistsF0ssDIrLrEmARQrLbBeLLAyK7A2Ky2wXyywMiuwNystsGAssAAWsDIrsDgrLbBhLLAzKy6xJgEUKy2wYiywMyuwNistsGMssDMrsDcrLbBkLLAzK7A4Ky2wZSywNCsusSYBFCstsGYssDQrsDYrLbBnLLA0K7A3Ky2waCywNCuwOCstsGkssDUrLrEmARQrLbBqLLA1K7A2Ky2wayywNSuwNystsGwssDUrsDgrLbBtLCuwCGWwAyRQeLABFTAtAAAAS7gAyFJYsQEBjlm5CAAIAGMgsAEjRLADI3CyBCgJRVJEsgoCByqxBgFEsSQBiFFYsECIWLEGA0SxJgGIUVi4BACIWLEGAURZWVlZuAH/hbAEjbEFAEQAAA==") format("truetype");
}
/*
Globals
*/
body {
margin: 0;
background: #556270;
color: #353d46;
font: 18px/27px 'Oxygen', sans-serif;
}
h1, h2, h3 {
color: #FF6B6B;
margin: 0 0 27px;
}
/*
LEFT MENU
*/
nav#left-slide-menu {
position: fixed;
top: 0;
left: -100px;
bottom: 0;
display: block;
float: left;
width: 100%;
max-width: 200px;
height: 100%;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
nav#left-slide-menu > ul {
display: block;
margin: 40px;
padding: 0;
list-style: none;
opacity: 0.5;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
nav#left-slide-menu > ul li {
color: #dfe5eb;
padding: 6px 0;
cursor: pointer;
}
nav#left-slide-menu > ul li:hover {
color: #59e9df;
}
nav#left-slide-menu > ul li:before {
font-family: "ico";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
color: #59e9df;
margin-right: 12px;
text-align: center;
font-variant: normal;
font-size: 0.75em;
text-transform: none;
line-height: 1em;
}
nav#left-slide-menu > ul li.sep {
margin-top: 7px;
padding-top: 14px;
border-top: 1px solid #6b7b8d;
}
nav#left-slide-menu > ul li.timeline:before {
content: '\e805';
}
nav#left-slide-menu > ul li.events:before {
content: '\e802';
}
nav#left-slide-menu > ul li.calendar:before {
content: '\e800';
}
nav#left-slide-menu > ul li.settings:before {
content: '\e803';
}
nav#left-slide-menu > ul li.logout:before {
content: '\e804';
}
body.left-menu-active nav#left-slide-menu {
left: 0px;
}
body.left-menu-active nav#left-slide-menu ul {
left: 0px;
opacity: 1;
}
div#content div.left-menu-trigger {
position: fixed;
top: 10px;
left: 10px;
width: 36px;
height: 36px;
background: #dfe5eb;
cursor: pointer;
border-radius: 5px;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
div#content div.left-menu-trigger:before {
content: '\e801';
display: inline-block;
width: 36px;
height: 36px;
color: black;
font-family: "ico";
font-style: normal;
font-size: 1.2em;
font-weight: normal;
font-variant: normal;
text-align: center;
text-transform: none;
line-height: 36px;
}
div#content div.left-menu-trigger:hover {
background: #556270;
}
div#content div.left-menu-trigger:hover:before {
color: #fcfeff;
}
body.left-menu-active div#content {
left: 200px;
border-radius: 7px 0 0 7px;
}
body.left-menu-active div#content .left-menu-trigger {
left: 210px;
}
/*
RIGHT MENU
*/
nav#right-slide-menu {
position: fixed;
top: 0;
right: -100px;
bottom: 0;
display: block;
float: right;
width: 100%;
max-width: 150px;
height: 100%;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
nav#right-slide-menu > ul {
display: block;
margin: 40px;
padding: 0;
list-style: none;
opacity: 0.5;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
nav#right-slide-menu > ul li {
color: #dfe5eb;
padding: 6px 0;
cursor: pointer;
}
nav#right-slide-menu > ul li:hover {
color: #59e9df;
}
nav#right-slide-menu > ul li:before {
font-family: "ico";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
color: #59e9df;
margin-right: 12px;
text-align: center;
font-variant: normal;
font-size: 0.75em;
text-transform: none;
line-height: 1em;
}
nav#right-slide-menu > ul li.sep {
margin-top: 7px;
padding-top: 14px;
border-top: 1px solid #6b7b8d;
}
nav#right-slide-menu > ul li.timeline:before {
content: '\e805';
}
nav#right-slide-menu > ul li.events:before {
content: '\e802';
}
nav#right-slide-menu > ul li.calendar:before {
content: '\e800';
}
nav#right-slide-menu > ul li.settings:before {
content: '\e803';
}
nav#right-slide-menu > ul li.logout:before {
content: '\e804';
}
body.right-menu-active nav#right-slide-menu {
right: 0px;
}
body.right-menu-active nav#right-slide-menu ul {
right: 0px;
opacity: 1;
}
div#content div.right-menu-trigger {
position: fixed;
top: 10px;
right: 10px;
width: 36px;
height: 36px;
background: #dfe5eb;
cursor: pointer;
border-radius: 5px;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
div#content div.right-menu-trigger:before {
content: '\e801';
display: inline-block;
width: 36px;
height: 36px;
color: black;
font-family: "ico";
font-style: normal;
font-size: 1.2em;
font-weight: normal;
font-variant: normal;
text-align: center;
text-transform: none;
line-height: 36px;
}
div#content div.right-menu-trigger:hover {
background: #556270;
}
div#content div.right-menu-trigger:hover:before {
color: #fcfeff;
}
body.right-menu-active div#content {
right: 150px;
border-radius: 0 7px 7px 0;
}
body.right-menu-active div#content .right-menu-trigger {
right: 160px;
}
/*
Content
*/
div#content {
position: fixed;
top: 0;
left: 0;
right: 0;
width: 100%;
height: 100%;
padding: 0px;
overflow: scroll;
background: #fcfeff;
border-radius: 0;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-moz-box-shadow: -3px 0 6px #4a5562;
-webkit-box-shadow: -3px 0 6px #4a5562;
box-shadow: -3px 0 6px #4a5562;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
div#map {
width: 100%;
height: 100%;
}
<!DOCTYPE html>
<head>
<title>AC Directions</title>
<link rel="stylesheet" type="text/css" href="../_/base.css">
<link rel="stylesheet" type="text/css" href="directions.css">
</head>
<body>
<!-- LEFT SLIDE MENU -->
<nav id="left-slide-menu">
<ul>
<li class="timeline">Timeline</li>
<li class="events">Events</li>
<li class="calendar">Calendar</li>
<li class="sep settings">Settings</li>
<li class="logout">Logout</li>
</ul>
</nav>
<!-- RIGHT SLIDE MENU -->
<nav id="right-slide-menu">
<ul>
<li class="timeline">Timeline</li>
<li class="events">Events</li>
<li class="calendar">Calendar</li>
<li class="sep settings">Settings</li>
<li class="logout">Logout</li>
</ul>
</nav>
<!-- CONTENT -->
<div id="content">
<div id="map"></div>
<div class="left-menu-trigger"></div>
<div class="right-menu-trigger"></div>
</div>
<script src="//maps.google.com/maps/api/js"></script>
<script defer="defer" src="//d3js.org/d3.v3.min.js"></script>
<script defer="defer" src="directions.js"></script>
</body>
</html>
For the first problem :
remove width: 100% from div#content.
For the second problem :
change this line :
$body.className = ( $body.className == 'left-menu-active' )? '' : 'left-menu-active';
To :
$body.classList.toggle('left-menu-active');
And change this line too:
$body.className = ( $body.className == 'right-menu-active' )? '' : 'right-menu-active';
To :
$body.classList.toggle('right-menu-active');
This way you can have both of the menus visible at the same time.
In your css, in div#content, if you delete width: 100%;, you can see the right side content appearing when you click the icon.
/*
Slidemenu
*/
(function() {
var $body = document.body,
$left_menu_trigger = $body.getElementsByClassName('left-menu-trigger')[0];
if ( typeof $left_menu_trigger !== 'undefined' ) {
$left_menu_trigger.addEventListener('click', function() {
$body.className = ( $body.className == 'left-menu-active' )? '' : 'left-menu-active';
});
}
}).call(this);
(function() {
var $body = document.body,
$right_menu_trigger = $body.getElementsByClassName('right-menu-trigger')[0];
if ( typeof $right_menu_trigger !== 'undefined' ) {
$right_menu_trigger.addEventListener('click', function() {
$body.className = ( $body.className == 'right-menu-active' )? '' : 'right-menu-active';
});
}
}).call(this);
// Create the Google Map…
var map = new google.maps.Map(d3.select("#map").node(), {
zoom: 8,
center: new google.maps.LatLng(43.0756, -70.7606),
mapTypeId: google.maps.MapTypeId.TERRAIN,
disableDefaultUI: true
});
#import url(http://fonts.googleapis.com/css?family=Oxygen:400,700);
/*
Fonts
*/
#font-face {
font-family: 'ico';
src: url("data:application/octet-stream;base64,d09GRgABAAAAAA3MABAAAAAAFdAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABoAAAAcZZJr3kdERUYAAAGIAAAAHwAAACAANgAGT1MvMgAAAagAAABHAAAAVj4nWUhjbWFwAAAB8AAAAEwAAAFW0CkD5WN2dCAAAAI8AAAAFAAAABwG1/8IZnBnbQAAAlAAAAT5AAAJkYoKeDtnYXNwAAAHTAAAAAgAAAAIAAAAEGdseWYAAAdUAAAETwAABla173lDaGVhZAAAC6QAAAAzAAAANv9VQE9oaGVhAAAL2AAAAB4AAAAkB9wDo2htdHgAAAv4AAAAJAAAACQasQBdbG9jYQAADBwAAAAUAAAAFAS6BnNtYXhwAAAMMAAAACAAAAAgAR4KLW5hbWUAAAxQAAAA1wAAAVaRnTKOcG9zdAAADSgAAABLAAAAYtX5CoJwcmVwAAANdA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jOBshICBGI0ewACsjYTghWbEmARQrLbA9LLAwKy6xJgEUKy2wPiywMSshIyAgPLAEI0IjOLEmARQrsARDLrAmKy2wPyywABUgR7AAI0KyAAEBFRQTLrAsKi2wQCywABUgR7AAI0KyAAEBFRQTLrAsKi2wQSyxAAEUE7AtKi2wQiywLyotsEMssAAWRSMgLiBGiiNhOLEmARQrLbBELLAII0KwQystsEUssgAAPCstsEYssgABPCstsEcssgEAPCstsEgssgEBPCstsEkssgAAPSstsEossgABPSstsEsssgEAPSstsEwssgEBPSstsE0ssgAAOSstsE4ssgABOSstsE8ssgEAOSstsFAssgEBOSstsFEssgAAOystsFIssgABOystsFMssgEAOystsFQssgEBOystsFUssgAAPistsFYssgABPistsFcssgEAPistsFgssgEBPistsFkssgAAOistsFossgABOistsFsssgEAOistsFwssgEBOistsF0ssDIrLrEmARQrLbBeLLAyK7A2Ky2wXyywMiuwNystsGAssAAWsDIrsDgrLbBhLLAzKy6xJgEUKy2wYiywMyuwNistsGMssDMrsDcrLbBkLLAzK7A4Ky2wZSywNCsusSYBFCstsGYssDQrsDYrLbBnLLA0K7A3Ky2waCywNCuwOCstsGkssDUrLrEmARQrLbBqLLA1K7A2Ky2wayywNSuwNystsGwssDUrsDgrLbBtLCuwCGWwAyRQeLABFTAtAAAAS7gAyFJYsQEBjlm5CAAIAGMgsAEjRLADI3CyBCgJRVJEsgoCByqxBgFEsSQBiFFYsECIWLEGA0SxJgGIUVi4BACIWLEGAURZWVlZuAH/hbAEjbEFAEQAAA==") format("truetype");
}
/*
Globals
*/
body {
margin: 0;
background: #556270;
color: #353d46;
font: 18px/27px 'Oxygen', sans-serif;
}
h1, h2, h3 {
color: #FF6B6B;
margin: 0 0 27px;
}
/*
LEFT MENU
*/
nav#left-slide-menu {
position: fixed;
top: 0;
left: -100px;
bottom: 0;
display: block;
float: left;
width: 100%;
max-width: 200px;
height: 100%;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
nav#left-slide-menu > ul {
display: block;
margin: 40px;
padding: 0;
list-style: none;
opacity: 0.5;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
nav#left-slide-menu > ul li {
color: #dfe5eb;
padding: 6px 0;
cursor: pointer;
}
nav#left-slide-menu > ul li:hover {
color: #59e9df;
}
nav#left-slide-menu > ul li:before {
font-family: "ico";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
color: #59e9df;
margin-right: 12px;
text-align: center;
font-variant: normal;
font-size: 0.75em;
text-transform: none;
line-height: 1em;
}
nav#left-slide-menu > ul li.sep {
margin-top: 7px;
padding-top: 14px;
border-top: 1px solid #6b7b8d;
}
nav#left-slide-menu > ul li.timeline:before {
content: '\e805';
}
nav#left-slide-menu > ul li.events:before {
content: '\e802';
}
nav#left-slide-menu > ul li.calendar:before {
content: '\e800';
}
nav#left-slide-menu > ul li.settings:before {
content: '\e803';
}
nav#left-slide-menu > ul li.logout:before {
content: '\e804';
}
body.left-menu-active nav#left-slide-menu {
left: 0px;
}
body.left-menu-active nav#left-slide-menu ul {
left: 0px;
opacity: 1;
}
div#content div.left-menu-trigger {
position: fixed;
top: 10px;
left: 10px;
width: 36px;
height: 36px;
background: #dfe5eb;
cursor: pointer;
border-radius: 5px;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
div#content div.left-menu-trigger:before {
content: '\e801';
display: inline-block;
width: 36px;
height: 36px;
color: black;
font-family: "ico";
font-style: normal;
font-size: 1.2em;
font-weight: normal;
font-variant: normal;
text-align: center;
text-transform: none;
line-height: 36px;
}
div#content div.left-menu-trigger:hover {
background: #556270;
}
div#content div.left-menu-trigger:hover:before {
color: #fcfeff;
}
body.left-menu-active div#content {
left: 200px;
border-radius: 7px 0 0 7px;
}
body.left-menu-active div#content .left-menu-trigger {
left: 210px;
}
/*
RIGHT MENU
*/
nav#right-slide-menu {
position: fixed;
top: 0;
right: -100px;
bottom: 0;
display: block;
float: right;
width: 100%;
max-width: 150px;
height: 100%;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
nav#right-slide-menu > ul {
display: block;
margin: 40px;
padding: 0;
list-style: none;
opacity: 0.5;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
nav#right-slide-menu > ul li {
color: #dfe5eb;
padding: 6px 0;
cursor: pointer;
}
nav#right-slide-menu > ul li:hover {
color: #59e9df;
}
nav#right-slide-menu > ul li:before {
font-family: "ico";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
color: #59e9df;
margin-right: 12px;
text-align: center;
font-variant: normal;
font-size: 0.75em;
text-transform: none;
line-height: 1em;
}
nav#right-slide-menu > ul li.sep {
margin-top: 7px;
padding-top: 14px;
border-top: 1px solid #6b7b8d;
}
nav#right-slide-menu > ul li.timeline:before {
content: '\e805';
}
nav#right-slide-menu > ul li.events:before {
content: '\e802';
}
nav#right-slide-menu > ul li.calendar:before {
content: '\e800';
}
nav#right-slide-menu > ul li.settings:before {
content: '\e803';
}
nav#right-slide-menu > ul li.logout:before {
content: '\e804';
}
body.right-menu-active nav#right-slide-menu {
right: 0px;
}
body.right-menu-active nav#right-slide-menu ul {
right: 0px;
opacity: 1;
}
div#content div.right-menu-trigger {
position: fixed;
top: 10px;
right: 10px;
width: 36px;
height: 36px;
background: #dfe5eb;
cursor: pointer;
border-radius: 5px;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
div#content div.right-menu-trigger:before {
content: '\e801';
display: inline-block;
width: 36px;
height: 36px;
color: black;
font-family: "ico";
font-style: normal;
font-size: 1.2em;
font-weight: normal;
font-variant: normal;
text-align: center;
text-transform: none;
line-height: 36px;
}
div#content div.right-menu-trigger:hover {
background: #556270;
}
div#content div.right-menu-trigger:hover:before {
color: #fcfeff;
}
body.right-menu-active div#content {
right: 150px;
border-radius: 0 7px 7px 0;
}
body.right-menu-active div#content .right-menu-trigger {
right: 160px;
}
/*
Content
*/
div#content {
position: fixed;
top: 0;
left: 0;
right: 0;
/* width: 100%; *************************************/
height: 100%;
padding: 0px;
overflow: scroll;
background: #fcfeff;
border-radius: 0;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-moz-box-shadow: -3px 0 6px #4a5562;
-webkit-box-shadow: -3px 0 6px #4a5562;
box-shadow: -3px 0 6px #4a5562;
-moz-transition: all 300ms;
-webkit-transition: all 300ms;
transition: all 300ms;
}
div#map {
width: 100%;
height: 100%;
}
<!DOCTYPE html>
<head>
<title>AC Directions</title>
<link rel="stylesheet" type="text/css" href="../_/base.css">
<link rel="stylesheet" type="text/css" href="directions.css">
</head>
<body>
<!-- LEFT SLIDE MENU -->
<nav id="left-slide-menu">
<ul>
<li class="timeline">Timeline</li>
<li class="events">Events</li>
<li class="calendar">Calendar</li>
<li class="sep settings">Settings</li>
<li class="logout">Logout</li>
</ul>
</nav>
<!-- RIGHT SLIDE MENU -->
<nav id="right-slide-menu">
<ul>
<li class="timeline">Timeline</li>
<li class="events">Events</li>
<li class="calendar">Calendar</li>
<li class="sep settings">Settings</li>
<li class="logout">Logout</li>
</ul>
</nav>
<!-- CONTENT -->
<div id="content">
<div id="map"></div>
<div class="left-menu-trigger"></div>
<div class="right-menu-trigger"></div>
</div>
<script src="//maps.google.com/maps/api/js"></script>
<script defer="defer" src="//d3js.org/d3.v3.min.js"></script>
<script defer="defer" src="directions.js"></script>
</body>
</html>
I'm having some issues with my navbar menu for my site. I want to have the main menu, a sub menu and a sub menu to that. So 3 levels total.
So far I have gotten the 2 levels to work, but I cannot get the 3rd level to go under the 2nd with z-indexing. Currently they are only on the same index it appears.
Anything I've tried messes up with the jQuery script I did for displaying the select instead of the menu when on small screens.
So how can I do this?
Fiddle (Go Products > Oticon).
HTML
<header>
<select class="menu_mobile_top">
<option>Home</option>
<option>Services</option>
<option>Products</option>
<option>Shop</option>
<option>Prices</option>
<option>About</option>
<option>Contact</option>
</select>
<nav>
<ul class="nav">
<li role="presentation" class="active">Home</li>
<li role="presentation">Services
<ul class="subnav">
<li role="presentation">Service 1
<li role="presentation">Service 2
<li role="presentation">Service 3
</ul>
</li>
<li role="presentation">Products
<ul class="subnav">
<li role="presentation">Phonak</li>
<li role="presentation">ReSound</li>
<li role="presentation">Siemens</li>
<li role="presentation">Starkey</li>
<li role="presentation">Widex</li>
<li role="presentation">Oticon
<ul class="subnavoptions">
<li role="presentation">Test1</li>
<li role="presentation">Test 2</li>
</ul>
</li>
<li role="presentation">Unitron</li>
<li role="presentation">Bernafon</li>
</ul>
</li>
<li role="presentation">Shop</li>
<li role="presentation">Prices</li>
<li role="presentation">About</li>
<li role="presentation">Contact</li>
</ul>
</nav>
</header>
CSS
body {
font-size: 0;
text-align: center;
background-image: url('../images/bg.png');
background-repeat: repeat;
font-family: 'Montserrat', sans-serif;
}
header {
width: 100%;
height: 50px;
background: #304770;
z-index: 10;
}
h1 {
font-family: 'Montserrat', sans-serif;
font-weight: bold;
font-size: 34pt;
}
a {
text-decoration: none;
color: inherit;
}
nav {
position: relative;
width: 100%;
z-index: 10;
}
a:hover {
text-decoration: none;
color: inherit;
}
::-webkit-input-placeholder {
color: #99C2EC;
}
:-moz-placeholder { /* Firefox 18- */
color: #99C2EC;
}
::-moz-placeholder { /* Firefox 19+ */
color: #99C2EC;
}
:-ms-input-placeholder {
color: #99C2EC;
}
.bodyframe {
display: inline-block;
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
}
.div_container {
max-width: 1460px;
width: 100%;
display: inline-block;
margin: 0 auto;
}
.logo-div {
padding: 15px 0 10px;
}
.logo-div div {
display: inline-block;
width: 50%;
font-size: 14px;
color: #304770;
}
.center {
margin: 0 auto;
}
.nav-offset {
display: inline-block;
}
.nav {
height: 50px;
display: block;
position: relative;
list-style: none;
background: #304770;
}
.nav li {
display: inline-block;
background-color: #304770;
margin: 0 5px;
position: static;
}
.nav li a {
padding: 12px 15px;
font-size: 18px;
color: #EFEFEF;
display: block;
}
.nav li.active a {
color: orange;
}
.nav > li.active > a:before {
width: 100%;
}
.nav li:hover > a {
background-color: #304770;
color: orange;
transition: color 0.25s;
}
.nav > li > a:before {
content: "";
display: block;
position: absolute;
left: 0;
bottom: 0;
height: 3px;
width: 0;
background-color: orange;
-webkit-transition: width 0.2s;
-moz-transition: width 0.2s;
-o-transition: width 0.2s;
transition: width 0.2s;
}
.nav > li:nth-last-of-type(1) > a:after {
display: none;
}
.nav li a:hover:before {
width: 100%;
}
.nav > li > a:after {
content: "";
display: block;
position: absolute;
right: -8px;
top: 21px;
height: 6px;
width: 6px;
background: #ffffff;
opacity: .5;
}
.nav li:hover .subnav {
top: 49px;
}
.subnav {
border-bottom: 1px solid #304770;
width: 100%;
list-style-type: none;
display: block;
position: absolute;
top: 12px;
z-index: -1;
left: 0;
margin: 0;
padding: 0;
background-color: #ccc;
transition: top 0.2s;
-webkit-transition: top 0.2s;
-moz-transition: top 0.2s;
-o-transition: top 0.2s;
-webkit-transition-delay: 0.05s;
-moz-transition-delay: 0.05s;
-o-transition-delay: 0.05s;
transition-delay: 0.05s;
}
.subnav > li {
display: inline-block;
background-color: #ccc;
margin: 0;
padding: 0 5px;
}
.subnav li a {
padding: 8px 10px;
font-size: 14px;
color: #304770;
display: block;
}
.subnav li:hover .subnavoptions {
top: 36px;
}
.subnavoptions {
border-bottom: 1px solid #304770;
width: 100%;
list-style-type: none;
display: block;
position: absolute;
top: 0px;
z-index: -2;
left: 0;
margin: 0;
padding: 0;
background-color: #EFEFEF;
transition: top 0.2s;
-webkit-transition: top 0.2s;
-moz-transition: top 0.2s;
-o-transition: top 0.2s;
-webkit-transition-delay: 0.05s;
-moz-transition-delay: 0.05s;
-o-transition-delay: 0.05s;
transition-delay: 0.05s;
}
.subnavoptions li {
display: inline-block;
background-color: #ccc;
margin: 0 5px;
}
.subnavoptions li a {
padding: 8px 10px;
font-size: 14px;
color: #304770;
display: block;
}
.menu_mobile_top {
display: none;
position: relative;
font-size: 16px;
top: 5px;
background-color: #2A333F;
border: 1px solid transparent;
color: #EFEFEF;
width: 250px;
margin: 5px 0;
padding: 3px;
}
.menu_mobile_top:focus, option:focus {
outline: none !important;
border-color: orange;
}
I don't see the styles defined for third level menu. Add the following and try.
.subnavoptions li a li{
top:50px;
}