Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #863985

    mf34
    Participant

    Hi there,

    quick question: I have a link in my menu that points to a section on the homepage (url.com/#section-6). However when I only visit url.com, the link shows as if it’s active (s. screenshot). How do I get it not to show as active?

    Thanks!

    #864435

    Christopher
    Moderator

    Hi there,

    Please provide us URL and login credentials so we can take a closer look.

    Thanks.

    #864540

    mf34
    Participant
    This reply has been marked as private.
    #864852

    Rupok
    Member

    Hi there,

    Thanks for writing back! Instead of using full URL, you need to use the ID only (i.e. #x-section-6) as the URL. Note that One Page Navigation supposed to work on single page website only. As you are trying to use this on multi page website with other menu links so in that case you need to remove the styling for the current menu item. To do this, add the below custom CSS :

    .x-navbar .desktop .x-nav > .current-menu-item > a > span {
      border: medium none;
    }
    
    .x-navbar .desktop .x-nav > .current-menu-item > a, .x-navbar .mobile .x-nav .current-menu-item > a {
      color: #444444;
    }

    Hope this helps.

    Cheers!

    #865480

    mf34
    Participant

    Hi Rupok,

    thanks for your help! Your code removed the styling from the “home” button also, however I was able to fix it by using

    .x-navbar .desktop .x-nav > .menu-item-6 > a > span {
      border: medium none;
    }
    
    .x-navbar .desktop .x-nav > .menu-item-6 > a, .x-navbar .mobile .x-nav .current-menu-item > a {
      color: #444444;
    }

    (menu-item-6 being the “A propos” link).

    Thanks so much for your help!

    #865663

    Paul R
    Moderator

    You’re welcome! Glad you were able to figure it out.