- This topic has 7 replies, 2 voices, and was last updated 6 years, 11 months ago by
David.
-
AuthorPosts
-
May 3, 2019 at 8:23 am #888047
Ashley
I’d really like to replicate the dropdown style on this site here:
https://www.herbertwoods.co.uk/As far as I can see there are 3 separate elements:
> Center Aligned Dropdown menus (underneath it’s parent anchor link)
> Small triangle added to the top of the menu
> subtle ‘Ease-up’ animation on hoverCan you help with recreating any of this in GP?
May 3, 2019 at 9:34 am #888122David
StaffCustomer SupportHi there,
i have this CSS which is something similar:
#site-navigation ul.menu>li>ul:before { content: ""; border-style: solid; border-width: 0 9px 9px 9px; border-color: transparent transparent #22181c transparent; height: 0; position: absolute; left: 50%; top: -7.5px; width: 0; -webkit-transform: rotate(360deg) translateX(-50%); } #site-navigation ul ul { transform: translatey(6px); transition: 0.15s ease-in; } #site-navigation ul li:hover ul { transform: translateY(0px); transition: 0.15s ease-in; } #site-navigation:not(.toggled) ul ul { transition: opacity 0.35s linear; }May 6, 2019 at 11:13 am #890970Ashley
David, you’re a legend – thank you!
I’ve bookmarked this for future use 🙂
May 6, 2019 at 12:56 pm #891033David
StaffCustomer SupportWell i am glad to be of help 🙂
May 7, 2019 at 4:36 am #891577Ashley
Hi There,
Sorry to be a pain, I’ve spotted a potential issue I was wondering if you could help with?
The menu items veer off the edge of the browser window (see here – http://tinypic.com/r/2mzmmnb/9) – is there a way to prevent this from happening?
May 7, 2019 at 5:48 am #891649David
StaffCustomer SupportHmmm – so the submenus are absolutely positioned so it won’t detect the browser edge. One workaround would be this CSS:
@media (max-width: 1300px) and (min-width: 768px) { #sticky-navigation li.push-left .sub-menu { left: auto !important; right: 0; } }And then add the
push-leftcustom class to the Therapies menu item.https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classes
You may want to tweak the max-width and min-widths to suit
May 7, 2019 at 6:35 am #891703Ashley
That’s cracked it! – Thanks again David 🙂
May 7, 2019 at 6:36 am #891706David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.