Site logo

[Resolved] Main Menu Effect for active/current

Home Forums Support [Resolved] Main Menu Effect for active/current

Home Forums Support Main Menu Effect for active/current

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #125894
    Alexander

    Hi,

    how can i get the Effect, that the color of the active/current Menu Item is higher (above) than the Main Menu-Bar, such as in Sahifa Theme?

    Thanks,

    Alex

    #125999
    Tom
    Lead Developer
    Lead Developer

    Hi Alex,

    Try something like this:

    .main-navigation .main-nav ul > .current-menu-item > a, 
    .main-navigation .main-nav ul > .current-menu-parent > a, 
    .main-navigation .main-nav ul > .current-menu-ancestor > a,
    .main-navigation .main-nav ul > .current-menu-item > a:hover, 
    .main-navigation .main-nav ul > .current-menu-parent > a:hover, 
    .main-navigation .main-nav ul > .current-menu-ancestor > a:hover {
          -webkit-box-shadow: 0px -14px 0px 0px #000000;
          -moz-box-shadow: 0px -14px 0px 0px #000000;
          box-shadow: 0px -14px 0px 0px #000000;
    }
    #126024
    Alexander

    This works great!

    Many Thanks Tom.

    #126047
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

    #135298
    Alexander

    Hi Tom,

    a little Problem with this: The first Level of the Main menue is ok and looks like it should. But if there are Subcategories, it looks strangely. Any Ideas?

    Alex

    #135323
    Tom
    Lead Developer
    Lead Developer

    I’ve edited the above code so it should only work on the top level items 🙂

    #135336
    Alexander

    For me it does not work, unfortunately.

    #135356
    Tom
    Lead Developer
    Lead Developer

    Still showing on sub navigation or not showing at all?

    #135365
    Tom
    Lead Developer
    Lead Developer

    Give this a shot:

    .main-navigation .main-nav > ul > .current-menu-item > a, 
    .main-navigation .main-nav > ul > .current-menu-parent > a, 
    .main-navigation .main-nav > ul > .current-menu-ancestor > a,
    .main-navigation .main-nav > ul > .current-menu-item > a:hover, 
    .main-navigation .main-nav > ul > .current-menu-parent > a:hover, 
    .main-navigation .main-nav > ul > .current-menu-ancestor > a:hover {
          -webkit-box-shadow: 0px -14px 0px 0px #000000;
          -moz-box-shadow: 0px -14px 0px 0px #000000;
          box-shadow: 0px -14px 0px 0px #000000;
    }
    #135372
    Alexander

    Yeahh Tom, this do the Job!

    Thanks a lot.

    #135373
    Tom
    Lead Developer
    Lead Developer

    Glad it’s working 🙂

    #329692
    Mary Pearson

    Hi Tom,

    This is exactly what I’d like to do with my sites at https://plantbest.com/us/shop/ and https://plantbest.com/ca/shop/ for both primary and secondary menus, but I need more help with it.

    The code above shows a black line across the top of the current selection so I know I’m on the right track, but that’s as far as I can get.

    Any chance you could give me the CSS for my site. There are no sub-menus or anything.

    Many thanks!

    #329715
    Tom
    Lead Developer
    Lead Developer

    Not sure I understand. Any chance you can create a new topic and post what you’re wanting to achieve and what you’ve tried?

    Thanks!

    #329989
    Mary Pearson

    Yes of course.

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