Tagged: drop down menu, dropdown navigation, mega menu
-
AuthorPosts
-
November 25, 2024 at 10:01 pm #1472195
Hello,
I’ve got a client who wants the mega-menu on the site to look like a specific example they found online. I’ve tried to modify the existing menu with my limited CSS skills, but can’t seem to get it to work.
Links for comparison are in the Private Content block.
Any help is appreciated!
Thank you,
Shane PoteeteNovember 26, 2024 at 7:20 am #1472219Hey BC-Clients,
Thank you for the inquiry.
Are you trying to decrease the space between the mega menu items? Try to add this css code:
#top #header .avia_mega_div > .sub-menu { padding: 2px 40px !important; border-top-width: 0; }
And to adjust the style of the links, include this:
#header .mega_menu_title { margin-bottom: 8px; font-size: 13px; line-height: 1em; font-weight: 600; display: block; font-weight: 400; }
You may need to leave the titles of the mega menu columns blank and add an actual menu item to each column.
Best regards,
IsmaelNovember 26, 2024 at 6:45 pm #1472298Hi Ismael,
Thanks for the reply! What you sent is part of the issue, but more importantly, it is getting the drop down mega menu to run FULL WIDTH of the screen and appear seamless with the upper navigation while also easing-in the menu links subtly like the example I sent previously (Quik Print site).
See screen capture in private content…
I’ve already incorporated the clients desired underline when active/hover over the main nav links, but they want our white mega menus to run the full width of the screen, and have all navigation sub-links ease-in/down top-to-bottom on dropdown load just like the Quik Print site. I’m unsure how to integrate this. I tried, but nothing I did would get the width to be full screen and the ease-in/down top-to-bottom effect wouldn’t work.
Any help is appreciated.
ShaneNovember 27, 2024 at 1:05 am #1472319can you post the link to that example page?
Is your header a shrinking one?
November 27, 2024 at 1:12 am #1472320Sure, here you go.
Here is the development site I am working on — Home page only right now (use the Services navigation menu link for comparison):
https://bclaunchpad.com/dev58/Here is a website with a mega-menu in the style they want to emulate:
https://qpokc.com/industries/associations-and-organizationsShane
November 27, 2024 at 7:24 am #1472342Hi,
, it is getting the drop down mega menu to run FULL WIDTH of the screen and appear seamless with the upper navigation
Unfortunately, there is no built-in option for this and it would require significant modifications to the theme. You may want to consider using a menu plugin, such as UberMenu or any of the plugins listed below, to achieve the desired menu layout and functionality.
1. QuadMenu
2. Superfly
https://codecanyon.net/item/superfly-responsive-wordpress-menu-plugin/8012790Best regards,
IsmaelNovember 27, 2024 at 8:29 am #1472344for the full-width mega-div you can try now:
#top #header .avia_mega_div { position: fixed; width: 96vw; left: 1.5vw !important; /*=== because of the scrollbar not 2vw ===*/ top: 120px; }
or maybe with background styling:
#top #header .avia_mega_div { position: fixed; width: 96vw; left: 1.5vw !important; top: 120px; background-color: rgba(255,255,255,0.8); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); border-radius: 0 0 15px 15px !important; border: 1px solid #FFF; } #top #header .avia_mega_div ul { background-color: transparent; }
next release there will be for shrinking headers a variable value ( –enfold-header-height) which represents what it said – the dynamically header-height.
for then we can usetop: var(--enfold-header-height);
for the rest i will look again to your example page.
December 2, 2024 at 4:42 pm #1472725Hi Guenni007 and Ismael,
I will look into the third party plugins, as well as the CSS tweaks you sent and see if any of those help. If I run into issues, I will reach back out.
Much appreciated!
ShaneDecember 3, 2024 at 8:11 am #1472767Hi,
We’ll keep the thread open. Let us know if you need more assistance.
Best regards,
IsmaelDecember 4, 2024 at 6:09 am #1472840Hi guys,
I’ve got the mega-menu navigation to be full width by modifying Guenni007’s CSS. Test with the “SERVICES” mega-menu item.
My /dev/ site: https://bclaunchpad.com/dev58//* === makes nav full width with addition of BLANK links === */ #top #header .avia_mega_div { position: fixed !important; width: 100vw !important; left: 0vw !important; right: 1.5vw !important; top: 140px !important; background-color: rgba(255,255,255,0.8) !important; -webkit-backdrop-filter: blur(5px) !important; backdrop-filter: blur(5px) !important; border-radius: 0 !important; border: 1px solid #ffffff !important; } #top #header .avia_mega_div ul { background-color: transparent !important; } /* ================ */ .blank-link > span.mega_menu_title { clear: both !important; color: transparent !important; }
Now, if you could possibly help me make the mega-menu (drop down) items ease-in from the top as in this example, that would be great.
Sample site the client likes: https://qpokc.com/services/offset-printingHere’s the CSS from the example site, but I’m not sure how to target the nav in the enfold theme drop down mega menus.
@media (min-width: 968px) { .l-navigation .dropdown { position: absolute; visibility: hidden; background-color: #01237A; width: 100%; top: 100%; left: 0; transition: height 1s ease-in; padding: 15px 0 15px 0; overflow: hidden; z-index: 1000; margin-top: -18px; } } .l-navigation .dropdown ul { max-width: 670px; margin: 0 auto; transition: none; position: relative; top: -10px; display: inline-block; text-align: left; } @media (min-width: 968px) { .l-navigation .dropdown ul { opacity: 0; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 30px; row-gap: 5px; } } .l-navigation .top-link-li:hover .dropdown { visibility: visible; } @media (min-width: 968px) { .l-navigation .top-link-li:hover .dropdown { transition: height 0.2s ease-in; } } @media (min-width: 968px) { .l-navigation .top-link-li:hover .dropdown ul { transition: all 0.5s ease-in-out; opacity: 1; top: 0; } }
Thank you in advance!
ShaneDecember 4, 2024 at 6:19 am #1472841First of all – The Top Positioning of 140px will cause some troubles. If the visitor moves the mouse down to click a link – and hovers the empty space – the mega div will close in some cases.
Does a full-width Mega Div make sense if you fill the free spaces with blind links?
December 4, 2024 at 6:38 am #1472842Not really, but it’s the only way I could figure out how to get the “look” the client wanted without installing a third-party plugin and reworking the navigation from the ground up, which I really don’t want to do. If there’s a better way to achieve the look the designer wanted, I’m all ears. ;)
December 4, 2024 at 7:24 am #1472843that css you have above does not help – because Structure was different and all classes are not present
But try f.e. instead:
#top #header .avia_mega_div { position: fixed !important; width: 100vw !important; height: 0px; left: 0px !important; right: 0px !important; top: 120px !important; background-color: rgba(255,255,255,0.8) !important; backdrop-filter: blur(8px); border-radius: 0 !important; border: 1px solid #ffffff !important; opacity: 0 !important; display: block !important; transition: all 0.7s ease } #top #header .menu-item-mega-parent:hover .avia_mega_div { height: 220px; opacity: 1 !important; transition: all 0.7s ease } #top #header .avia_mega_div .menu-item { opacity: 0; position: relative; transform: translateY(-120%); transition: transform 1s cubic-bezier(.68,-0.55,.27,1.55) 0.3s, opacity 0.3s ease ; } #top #header .menu-item-mega-parent:hover .avia_mega_div .menu-item { opacity: 1; transform: none; transition: transform 1s cubic-bezier(.68,-0.55,.27,1.55) 0.3s, opacity 0.3s ease ; }
December 4, 2024 at 7:33 am #1472844Getting space left and right – use instead padding – and erase all your dummy empty links:
f.e.:#top #header .avia_mega_div > .sub-menu { padding: 15px 17vw 15px 33vw !important; }
why these values – they are relative and will shrink if the browser window screen shrinks.
then – you got two empty links on left and one on the right side – so on total per row: 6 items
right 1/6 space wanted ≈ 17% and left 2/6 space needed ≈ 33%December 4, 2024 at 2:59 pm #1472917Guenni007,
Thank you so much! I NEVER would’ve gotten there on my own — I can hack together some basic CSS, but I was getting overwhelmed on this one. Following is what I used based on your recommendations to modify the navigation and to give the links the nice “ease-in” effect, in case someone else needs a similar solution.
/* === makes mega-menu drop down nav full width === */ #top #header .avia_mega_div { position: fixed !important; width: 100vw !important; height: 0px; left: 0px !important; right: 0px !important; top: 120px !important; background-color: rgba(255,255,255,0.8) !important; backdrop-filter: blur(8px); border-radius: 0 !important; border: 1px solid #ffffff !important; opacity: 0 !important; display: block !important; transition: all 0.7s ease } #top #header .menu-item-mega-parent:hover .avia_mega_div { height: 220px !important; opacity: 1 !important; transition: all 0.7s ease !important } #top #header .avia_mega_div .menu-item { opacity: 0; position: relative; transform: translateY(-120%); transition: transform 0.3s cubic-bezier(.68,-0.55,.27,1.55) 0.3s, opacity 0.3s ease ; } #top #header .menu-item-mega-parent:hover .avia_mega_div .menu-item { opacity: 1; transform: none; transition: transform 0.3s cubic-bezier(.68,-0.55,.27,1.55) 0.3s, opacity 0.3s ease ; } @media (min-width: 990px) { #top #header .avia_mega_div > .sub-menu { padding: 15px 240px 15px 120px !important; } } @media (max-width: 989px) { #top #header .avia_mega_div > .sub-menu { padding: 15px 160px 15px 80px !important; } }
I really do appreciate the help!!!
ShaneDecember 4, 2024 at 4:45 pm #1472924You are welcome
PS: if you correct the height to 195px :
#top #header .menu-item-mega-parent:hover .avia_mega_div { height: 195px !important; opacity: 1 !important; transition: all .7s ease !important; }
the ugly bottom is gone on mega-div – or you decide to have a transparent background for the sub-menus
#top #wrap_all .avia_mega_div ul { background-color: transparent !important; }
if you decide to have less height – you can get rid of backdrop-filter setting – because the sub-menus have a white background on your setting.
-
AuthorPosts
- You must be logged in to reply to this topic.