• Resolved faxuno

    (@faxuno)


    Hello!

    I have a little thing do to with menu in my theme.
    I have set MaxMegaMenu and everything is ok.

    But in the original theme there is an effect that in MaxMegaMenu is vanished, a line that appear under the item on hover.

    How may I restore this effect?

    This is the link of the original template: https://blossomthemes.com/theme-demo/?theme=blossom-spa

    • This topic was modified 4 years ago by faxuno.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi Faxuno,

    Please go to Mega Menu > Menu Themes > Custom Styling and add the following:

    @include desktop {
        #{$wrap} #{$menu} > li.mega-menu-item > a.mega-menu-link:after {
            display: block;
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0%;
            height: 3px;
            background: #000;
            transition: all 0.6s;
        }
        #{$wrap} #{$menu} > li.mega-menu-item:hover > a.mega-menu-link:after,
        #{$wrap} #{$menu} > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link:after {
            width: 100%;
        }
    }

    You will see the “background” CSS style there which you can change to your liking (it is set to black at the moment).

    Regards,
    Tom

    Thread Starter faxuno

    (@faxuno)

    Hi Tom!

    Thank you very much!

    I have set the right background value like the demo and now works correctly.

    Now, like the demo, I would have the also the same line on active status of the page, is it possible?

    Another thing is: could the MegaMenu panel be exactly after the hover line, like in demo template?

    Plugin Author megamenu

    (@megamenu)

    Hi faxuno,

    Thanks for leaving a review ??

    Please try this CSS instead:

    @include desktop {
        #{$wrap} #{$menu} > li.mega-menu-item > a.mega-menu-link:after {
            display: block;
            content: "";
            position: absolute;
            bottom: 3px;
            left: 0;
            width: 0%;
            height: 3px;
            background: #000;
            transition: all 0.6s;
            visibility: visible;
            opacity: 1;
        }
        #{$wrap} #{$menu} > li.mega-menu-item:hover > a.mega-menu-link:after,
        #{$wrap} #{$menu} > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link:after {
            width: 100%;
        }
    }

    Regards,
    Tom

    Thread Starter faxuno

    (@faxuno)

    Hi!

    Thank you Tom! The active status now is visible.

    The last thing I would have is this …..
    Could the MegaMenu panel be exactly after the hover line, like in demo template?
    I have see in Demo/Original Template that the active/hover line is more in high that in my site with Megamenu. Instead of translating the entire submenu panel, I think I would be better to have the active/hover line a bit higher …

    This is the actual working code in CSS Megamenu:

    @include desktop {
        #{$wrap} #{$menu} > li.mega-menu-item > a.mega-menu-link:after {
        	display: block;    
            content: "";
            position: absolute;
    		bottom: 0px;
            left: 0;
            width: 0%;
            height: 3px;
            background: rgba(255,255,255,.5);
            transition: all ease 0.35s;
    		visibility: visible;
            opacity: 1;
        }
        #{$wrap} #{$menu} > li.mega-menu-item:hover > a.mega-menu-link:after,
        #{$wrap} #{$menu} > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link:after {
            width: 100%;
        }
    }
    Plugin Author megamenu

    (@megamenu)

    Hi Faxuno,

    Hopefully we get it this time:

    @include desktop {
        #{$wrap} #{$menu} > li.mega-menu-item > a.mega-menu-link:after {
            display: block;
            content: "";
            position: absolute;
            bottom: 3px;
            top: auto;
            left: 0;
            width: 0%;
            height: 3px;
            background: #000;
            transition: all 0.6s;
            visibility: visible;
            opacity: 1;
        }
        #{$wrap} #{$menu} > li.mega-menu-item:hover > a.mega-menu-link:after,
        #{$wrap} #{$menu} > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link:after {
            width: 100%;
        }
    }

    (note the “top: auto” and “bottom: 3px” rules)

    Regards,
    Tom

    Thread Starter faxuno

    (@faxuno)

    Hi!

    Thank you Tom, perfect!

    There is another thing. In Original/Demo template, when I select an item in the sub-menu, the item kept the active status in sub-menu, and also the primary item in top level menu is active and underline.

    Is it possible in Max Mega Menu?

    Plugin Author megamenu

    (@megamenu)

    Hi Faxuno,

    Highlighting sub menu items is not a default option (as it can have unintended consequences), but it’s possible with some custom CSS that can be found on this page:

    https://www.megamenu.com/documentation/highlight-active-menu-items/

    Regards,
    Tom

    Thread Starter faxuno

    (@faxuno)

    Hi!

    Ok, perfect. Now also the sub-menu item is highlighted when the page is active.
    I have added the
    /* Apply Hover Styling to active Mega Menu – Second Level Links */ section of the page you have linked me.

    Last thing. Is it possible to have the respective primary menu item underlined when a sub-menu page is active?

    Plugin Author megamenu

    (@megamenu)

    Hi Faxuno,

    It is possible yes, use this CSS instead:

    @include desktop {
        #{$wrap} #{$menu} > li.mega-menu-item > a.mega-menu-link:after {
            display: block;
            content: "";
            position: absolute;
            bottom: 3px;
            top: auto;
            left: 0;
            width: 0%;
            height: 3px;
            background: #000;
            transition: all 0.6s;
            visibility: visible;
            opacity: 1;
        }
        #{$wrap} #{$menu} > li.mega-menu-item:hover > a.mega-menu-link:after,
        #{$wrap} #{$menu} > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link:after,
        #{$wrap} #{$menu} > li.mega-menu-item.mega-current-menu-ancestor > a.mega-menu-link:after, 
        #{$wrap} #{$menu} > li.mega-menu-item.mega-current-page-ancestor > a.mega-menu-link:after {
            width: 100%;
        }
    }

    Regards,
    Tom

    Thread Starter faxuno

    (@faxuno)

    Hi!

    Ok, perfect!

    Thank you very much Tom, your assistance is very precise and helpful!

    Fantastic, thank you!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Effect on item hover’ is closed to new replies.