[Resolved] Sub-navigation/menu styling

Home Forums Support [Resolved] Sub-navigation/menu styling

Home Forums Support Sub-navigation/menu styling

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2022624
    Oskar

    I’ve added a separator line between my submenu items but don’t need this line to show for the last submenu item. I tried with last child display none but this didn’t work. Also the submenu is overlapping with the main nav a little bit. It disappears tho when you scroll a little. I’d appreciate a little help with this.

    #2022669
    Elvin
    Staff
    Customer Support

    Hi Oskar,

    On your site’s custom CSS, you have this:

    .main-navigation .main-nav ul ul li a {
        text-transform: none;
        font-size: 12px;
        font-weight: 500;
        letter-spacing: 2px;
        text-align: left;
        border-bottom: 1px solid;
        border-color: #83918b;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    Replace it with this:

    .main-navigation .main-nav ul ul li a{
        text-transform: none; 
        font-size: 12px; 
        font-weight: 500; 
        letter-spacing: 2px; 
        text-align: left; 
        padding-top: 15px; 
        padding-bottom: 15px;
    }
    
    .main-navigation .main-nav ul ul li:not(:last-child) a{     
        border-bottom: 1px solid; 
        border-color: #83918b; 
    } 

    As for the submenu overlap, try playing around with the menu item’s height on Appearance > Customize > Layout > Primary Navigation

    A wise man once said:
    "Have you cleared your cache?"

    #2022709
    Oskar

    Thank you, that’s amazing! It worked for desktop, how do I get the same for the mobile menu?

    #2022720
    Elvin
    Staff
    Customer Support

    Try modifying the selector not(:last-child) to not(:last-child,:only-child) so it applies only to submenus with multiple items. ๐Ÿ˜€

    A wise man once said:
    "Have you cleared your cache?"

    #2023319
    Oskar

    Thank you! That worked.

    #2028374
    Elvin
    Staff
    Customer Support

    No problem. Glad to be of any help. ๐Ÿ˜€

    A wise man once said:
    "Have you cleared your cache?"

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