Skip to content

Instantly share code, notes, and snippets.

@marklchaves
Last active July 18, 2020 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marklchaves/70a232b69587cb833d4a333c3d09a58f to your computer and use it in GitHub Desktop.
Save marklchaves/70a232b69587cb833d4a333c3d09a58f to your computer and use it in GitHub Desktop.
Fix for the extra menu item highlighting when using standard and hamburger menu at the same time. Tested on ThemeFusion Avada 6.1.2.
/* Disable the highlight bar over the hamburger menu by default. */
#menu-item-1374 > a {
border-top-width: 3px;
border-top-style: none;
}
/** Turn on the hamburger highlight bar when on a page in the hamburger menu.*/
/**
* These two pages are in the hamburger menu. So, turn back on the highlight
* bar when we are on these two pages.
*/
.page-id-1368 #menu-item-1374 > a, .page-id-962 #menu-item-1374 > a {
border-top-width: 3px;
border-top-style: solid;
}
/**
* On mobile, if we are on a top level nav page that also includes an
* anchor link in the menu, only highlight the main top level nav
* menu item. Turn off highlighting for the anchor menu item.
*/
/**
* In this example, we're on the homepage. The homepage menu item
* is highlighted. But, the Location menu item is also highlighted
* because it's a link that points to an anchor on the homepage. So,
* disable the redundant highlight by turning the bg colour the same
* as the menu bg colour. In this case, that colour it's white.
*/
.page-id-840 #mobile-menu-item-1374 > a {
background-color: white !important;
}
.page-id-840 .fusion-mobile-current-nav-item:nth-child(2) > a {
background-color: white !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment