- This topic has 5 replies, 2 voices, and was last updated 2 years, 4 months ago by Elvin.
-
AuthorPosts
-
December 16, 2021 at 8:52 pm #2051559Michael
Hi, I am trying to use right side sub menu items with a vertical navigation.
I used the CSS from this post https://generatepress.com/forums/topic/submenu-customization-with-leftside-navigation/ as a starting point with one very minor modification that I commented out as I didn’t want the sub menu full height.
/* Navigation sub item slide out direction */ @media (min-width: 1025px) { .site-header { overflow: visible; } .site-header .main-navigation li a:before { content: ""; position: absolute; width: 60px; height: 100%; top: 0; left: 100%; } .main-navigation:not(.toggled) ul li.sfHover>ul, .main-navigation:not(.toggled) ul li:hover>ul { left: 200px; display: flex; flex-flow: column nowrap; top: 0; } .main-navigation:not(.toggled) ul li.sfHover>ul:before, .main-navigation:not(.toggled) ul li:hover>ul:before { content: ""; background-color: #000000; z-index: 0; position: absolute; top: -100vh; left: 0; width: 240px; /*height: 200vh; */ } .gp-icon.icon-arrow { transform: rotateZ(270deg); top: 3px; position: relative; } }
Issue one – is the submenu items at the top of menu i.e “About” and “Hair Bar” are very difficult to hover to the sub menu items. Whereas the main level items down the middle of the menu work properly.
Issue two – I would like a gold sub menu left border like the original site I’m converting (Find URL is up in top bar), when you hover to sub menu the gold border activates with the sub menu.
December 16, 2021 at 9:33 pm #2051569ElvinStaffCustomer SupportHi there,
Try adding this CSS so the hover area is larger to keep the hover state intact for a better UX w/ the shorter menu items.
.inside-header.grid-container { padding-left: 0; padding-right: 0; } .inside-navigation.grid-container { flex-direction: column; } nav#site-navigation, div#primary-menu, .main-nav li { margin-right: 0 !important; margin-left: 0 !important; width: 100%; text-align: center; }
December 17, 2021 at 1:35 am #2051697MichaelThanks, that is a lot better for the hover issue!
What about the gold border?
December 17, 2021 at 1:39 am #2051708ElvinStaffCustomer SupportTry adding this for the left gold border for submenus:
ul.sub-menu { border-left: 2px solid var(--accent);; }
December 17, 2021 at 1:29 pm #2052426MichaelGreat, thanks!
December 19, 2021 at 4:02 pm #2053976ElvinStaffCustomer SupportNo problem. 😀
-
AuthorPosts
- You must be logged in to reply to this topic.