[Resolved] Navigation overlay

Home Forums Support [Resolved] Navigation overlay

Home Forums Support Navigation overlay

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #958901
    fabien

    How would I go about replicating the off-panel opacity overlay onto the desktop menu? The idea is that anything below the submenu (when active) is darkened.

    #959407
    Tom
    Lead Developer
    Lead Developer

    Hmm, kind of a tough one, but a cool idea.

    What kind of dropdown menu are you using? Hover or click?

    #959665
    fabien

    The menu is Click. Because your off-layer menu already has this, I would have thought it would be an easy one? πŸ™‚

    #959785
    Tom
    Lead Developer
    Lead Developer

    Can you add your link to the private field so I can see your site? I’ll play around to see if it’s possible at the moment πŸ™‚

    #959792
    fabien

    I’ve amended the link in the original post request.

    I was also hoping to control the location (margin left) of the navigation as header. At the moment the logo is blown up and stuck to the left. I need this navigation as header because I want the menus to span the whole screen width (not just the navigation container).

    #960341
    Tom
    Lead Developer
    Lead Developer

    Try this CSS:

    .dropdown-click .main-navigation .main-nav > ul > li > .sub-menu:after {
        content: "";
        display: block;
        height: 100%;
        width: 100%;
        position: absolute;
        top: 100%;
        background: rgba(0,0,0,0.5);
    }

    Not too sure what you mean about the navigation? Can you explain a bit more?

    #960697
    fabien

    fantastic! I changed height to 200% because it would fall short on a 27in screen… the 100% only really tells the shadow to meet the height of the submenu.

    How can we exclude secondary nav from this effect? This works very well on the main nav but because the secondary nav has much shorter submenus, it projects an awkward looking tiny shadow.

    I tried this with no effect.
    `.dropdown-click .main-nav .main-navigation > ul > li > .sub-menu:after

    #961314
    Tom
    Lead Developer
    Lead Developer

    I just adjusted the CSS above: https://generatepress.com/forums/topic/navigation-overlay/#post-960341

    Let me know πŸ™‚

    #961471
    fabien

    brilliant, thank you!

    #961564
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.