astroid-framework icon indicating copy to clipboard operation
astroid-framework copied to clipboard

problem with mega menu

Open SerGun78 opened this issue 1 year ago • 5 comments

Hy, all. When setting the main menu in the one template to display only up to level 2, the item in the standard menu mode is displayed correctly, i.e. without displaying third level items. But when we switch the menu item to the mega menu mode, zone lines from the third level appear, but the items themselves are not visible. opera_M4hAsQQQpe 2 3 изображение

SerGun78 avatar Jan 19 '24 15:01 SerGun78

@SerGun78

I just try and this is what I get — Are You sure you have a “Menu Item” to display in the Level 3 sub-menu?

Screen Shot 2024-01-19 at 12 25 08 PM

Chacapamac avatar Jan 19 '24 17:01 Chacapamac

I have three menu levels, but I don’t display the third, the settings are visible on the screenshots. In normal menu mode, the third level items are not visible, that's right. When I switch to mega menu mode, the third level is also not visible, but horizontal lines from this menu are visible.

SerGun78 avatar Jan 21 '24 17:01 SerGun78

@SerGun78 I think I understand. — How did you hide the third level? — I think you will have Target the element specifically in the Mega Menu and hide the top bar by css

This is just some test I’m doing now, not to sure how to target specifically where the menu item get is top border because it’s made on a non-specific “ul” item — I will check again....

Screen Shot 2024-01-22 at 7 42 11 PM

.megamenu-container, .megamenu-container .nav-submenu .nav-submenu {
  border-top: 4px solid rgba(40, 167, 69, 0.4);
}

• What do you want to achieve exactly? • Why have an item hidden on a menu?

Chacapamac avatar Jan 23 '24 00:01 Chacapamac

menu in the header, I want to display all menu items no further than 2 levels, so that large nesting is not visible, i.e. Level 3 is not needed there. I use the third level as navigation to anchor links for the landing page, to the site pages to which the second level menu item leads. At the same time, I use the menu module in a different position - content-top and display only level 3-3 in it nauaFzv4PQ opera_X7V5XqbQox opera_86Y9qvhlDj

SerGun78 avatar Jan 23 '24 06:01 SerGun78

I see, I think it will be hard to target the top border only as it is definite on a non-specific element, but my example above give me an idea. ( ul .nav-submenu)

On my example you can see that the CSS making this border is: .megamenu-container .nav-submenu .nav-submenu

Remark the 2 .nav-submenu in there. The logic here is that the border target here the second submenu (or third level). By logic you should be able to add any “.nav-submenu” there to target a specific sub-menu level.

.megamenu-container .nav-submenu .nav-submenu { border-top: none or transparent — Maybe you will have to insert the “!important” to force it? }

.megamenu-container .nav-submenu .nav-submenu {
border-top: none !important;
} 

For me this will target ONLY the third level (second sub-menu)

Chacapamac avatar Jan 23 '24 14:01 Chacapamac