[Support request] Issues with Changing Mobile Header Breakpoint when NOT Slideout Menu

Home Forums Support [Support request] Issues with Changing Mobile Header Breakpoint when NOT Slideout Menu

Home Forums Support Issues with Changing Mobile Header Breakpoint when NOT Slideout Menu

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #750435
    Vin

    Hi there,

    I’m trying to change the mobile header breakpoint to as high as 1023px using the following code example:

    https://gist.github.com/generatepress/282078076cd8631c17717d5b8640c043

    First, it wasn’t expanding the menu at all. I’m not using the slide-out-menu, so I figured I had to replace it here:

    .main-navigation:not(.slideout-navigation) .main-nav > ul {
                display: none;
            }

    changing this to

    .main-navigation:not(.mobile-header-navigation) .main-nav > ul {
        display: none;
      }

    Now the menu does expand, BUT it also displays it when not expanded, with the items next to each other.

    You can check what I mean at the URL (only visible to admins).

    So there must be something else I need to add. Any ideas?

    Thank you so much.

    #750652
    Vin

    One more note: The problematic screen width range is from 769px to 1023px, so anything above the standard breakpoint. Below the standard breakpoint everything seems to be fine.

    #750716
    Leo
    Staff
    Customer Support

    Hi there,

    Can you try using the code without changing anything?

    It shouldn’t matter if you are using the slideout navigation or not.

    Let me know ๐Ÿ™‚

    #750735
    Vin

    Hi Leo,

    I tried that before, but then the mobile menu wouldn’t expand at all. I changed it back to the original code now, so you can have a look.

    Thanks so much.

    Kevin

    #750739
    Leo
    Staff
    Customer Support

    And the mobile menu works fine without the code?

    #750747
    Vin

    Correct. You can check now (removed it).

    #750776
    Leo
    Staff
    Customer Support

    Hmm weird. Can you add the code back in so we can have another look?

    #753633
    Vin

    Hi Leo,

    just added the code back in. Now the mobile menu doesn’t expand upon clicking.

    Hope you can find the issue ๐Ÿ™‚

    Thanks,
    Kevin

    #753797
    David
    Staff
    Customer Support

    Hi there,

    with your @media (max-width: 1023px) query you have this CSS:

    .main-navigation:not(.slideout-navigation) .main-nav > ul {
    	display: none;
    }

    This is hiding the drop down.

    #753818
    Vin

    Hi David,

    thanks! I removed it and it does activate the dropdown. This is similar to what I tried in my first post. But then I get the other problem again: Between 789 and 1023 px the menu items now appear even when not expanded, but next to each other.

    #753858
    David
    Staff
    Customer Support

    Try using this CSS to hide the horizontal nav at that range:

    .main-navigation:not(.toggled) .main-nav > ul {
    	display: none;
    }
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.