If you take a look at my site, hover over products > cleaning products and you’ll notice that the list of child elements are off the screen without scrolling. Is it possible to set the child element list at the top of the dropdown menu? For example if you hover over products > residential, the child element list is at the top but that’s just because “residential” is at the top. Additionally, I’d only like to do this for particular parents because if it was to be done hovering over products > pacvac, the user would not be able to click on the child elements because the menu would disappear when moving the mouse into the background.
Thank you!
The page I need help with: [log in to see the link]
I’d like to be able to move those child menu items to the top to align with the parent navigation menu when hovering over some parent menu items.
For further clarification, at the moment the top of the child menu items are aligned with whatever the user hovers over (red) but I want it to be aligned with “Sebo residential vacuum cleaners” (green) as you can see in my screenshot:
I understand what you mean here, you want the first submenu to be aligned with the parent menu.
This is a bit tricky as targeting the whole menu will make future menu elements distorted, I tried applying the CSS below to the “Products” menu item only.
/* Make child menu align with parent */
#menu-item-428 > .sub-menu > .menu-item:hover{
position: initial !important;
bottom: 100% !important;
top: 0 !important;
}
However, there is a small problem with this. When hovering over the parent menu item “Pacvac Vacuum Cleaners”, there are only two items in its submenu making it too small to access. Upon moving the mouse off the parent menu, to get to the submenu, the whole menu rightfully disappears. SS attached:
If you look at the screenshot I sent in my post above, you can see me hovering over “Products” > “Pacvac Vacuum Cleaners”. If you can see, the submenu of “Pacvac vacuum cleaners” is at the top making it impossible to click on. That is what I’ve been asking for since the beginning of the post, however, it’s just on that one submenu that it breaks. The rest of the menu works perfectly. I have temporarily taken the CSS off the menu so that customers are able to use it to click through the Pacvac submenu. Is there any way that I can use the same CSS but exclude the “Pacvac Vacuum Cleaners” submenu from moving to the top?