Site logo

[Resolved] on mobile menu submenu, current background color

Home Forums Support [Resolved] on mobile menu submenu, current background color

Home Forums Support on mobile menu submenu, current background color

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2522594
    Jusung

    On mobile device, you can see the submenu of Service.

    On submenu on mobile device, I want to give current selected background color.

    So, when the menu is selected, there should be background color, which is #566270

    which code I can use for this?

    #2522601
    Leo
    Staff
    Customer Support

    Hi there,

    Just to confirm, do you want the color on desktop and mobile to be different?

    Let me know 🙂

    #2522728
    Jusung

    I am confused.

    On my mobile, the background current color works, but when I see the mobile size on pc, it doens’t work.
    Also, on submenu, the current color is gone..? Idk the color set is weird.

    can you help me with the code for current background color and current text color with red color only for mobile device?
    So, I can try to modify to test.

    #2522759
    Fernando
    Customer Support

    Hi Jusung,

    Can you first add actual links to the Menu items? They’re currently just set to #.

    Let us know once they are added.

    #2529064
    Jusung

    Hello. I have added the menu Item now.

    What I am trying to do is that

    I want to change the backgournd color of submenu only on mobile device.
    And I want to give left padding on submenu only on mobile device.

    #2529370
    David
    Staff
    Customer Support

    Hi there,

    the theme will automatically add the Customizer > Colors > Primary Navigation Menu –> Current color to that menu item, i visited this page on your site /문의/ and it worked.

    What am i missing ?

    #2529630
    Jusung

    On the link, you can see the image.

    on the sub menu, I want to give padding-left and want to change the background color only on mobile.

    When I tried, it was applied to PC and also, the padding was applied to the underline. I only want to give padding-left to the letter and it must be applied to only mobile.

    #2529792
    Leo
    Staff
    Customer Support

    on the sub menu, I want to give padding-left and want to change the background color only on mobile.

    The left padding is removed by the CSS you’ve added here:

    #primary-menu ul ul > li a {
        padding: 20px 0 20px 0;
        border-bottom: 1px solid #566270;
    }

    Perhaps you need to add some @media:
    https://docs.generatepress.com/article/responsive-display/#responsive-breakpoints

    #2530032
    Jusung

    Hello.

    It works well!!

    One thing is that I want to remove the last underline.
    I have made underline on the submenu. but the last one should be removed.

    Could you help me with this?

    #2530255
    David
    Staff
    Customer Support

    Change Leos CSS to:

    #primary-menu ul ul > li a {
        padding: 20px 0 20px 0;
    }
    
    #primary-menu ul ul > li:not(:last-child) a {
        border-bottom: 1px solid #566270;
    }
    #2530823
    Jusung

    Thank you! it works!

    #2531140
    David
    Staff
    Customer Support

    Glad to hear that

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