© 2021 Greatives Hub - Powered by Greatives & Greatives Web

Anchor menu overlaps page content on mobile.

Landing Forums Somentra (Impeka) Bug Report Anchor menu overlaps page content on mobile.

  • Creator
    Topic
  • #475
    DanielPerry
    Moderator

    Anchor menu overlaps page content on mobile.
    Not sure if I’m missing an option here, or if its a bug.
    Example.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #476
    Marius1989
    Participant
    Hub Member Badge

    Hey Dan.

    Try the following code, hope you like it.

    @media only screen and (max-width: 775px) {
      .grve-anchor-menu .grve-anchor-wrapper .grve-container {
        width: 100%;
        max-width: 100%;
        margin-left: 28px;
      }
      .grve-wrapper.grve-anchor-wrapper:after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        width: 150px;
        height: 100%;
        background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 61%, rgba(255,255,255,1) 100%);
        pointer-events: none;
      }
     .grve-anchor-menu ul {
        overflow-x: auto;
        white-space: nowrap;
        padding-right: 160px;
      }
    }

    Disclaimer: This is not an answer to your question, just my personal solution for better UI/UX, as soon as the anchor menu items takes too much place on smaller screens. I also added a small visual indicator, so the user knows there is still some content, when swiping the anchor menu.

    #477
    Marius1989
    Participant
    Hub Member Badge

    A solution to your question would be:

    #grve-page-anchor {
        height: auto;
    }

    There might be some issues with fixed, shrink, scroll up headers, etc. I guess this is why it requires a fixed height, but this is easy to find out just by testing.

    To avoid any potential issues, you could wrap this code inside media queries of max-width 1023px, this is the width where the responsive header comes into play by default ( I guess ). So there won’t be any issues with the desktop headers.

    • This reply was modified 4 years, 4 months ago by Marius1989.
    #479
    DanielPerry
    Moderator
    Hub Member Badge
    Collector Badge Lvl 2
    Moderator Badge Lvl 1
    Project Badge

    Perfect, thats awesome, thanks very much 🙂

    #480
    Marius1989
    Participant
    Hub Member Badge

    Glad you like it.
    Looks pretty sleek on your site!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Privacy Preferences

When you visit our website, it may store information through your browser from specific services, usually in the form of cookies. Here you can change your Privacy preferences. It is worth noting that blocking some types of cookies may impact your experience on our website and the services we are able to offer.

Our website uses cookies, mainly from 3rd party services. Define your Privacy Preferences and/or agree to our use of cookies.