Home>Support>Anchor Scroll with Offset

Anchor Scroll with Offset

By Rohit Bhosle, 8 years ago. Last reply by SiteOrigin, 8 years ago.

Hi,

I’m using SiteOrigin : North theme.

Trying to build a one page theme. So in the menu i tried putting links to anchors in the page.

For smooth scrolling and offset handling during move to anchor – i’m using the plugin “Hash Link Scroll Offset”.

Check out the website
www.rohitbhosle.com

try clicking the “Contact Me” link in the menu and it works only if the theme is in desktop mode.

Now try reducing the windows size, so that the theme adjust itself responsively for mobile screen sizing.
Here select the menu and select “Contact Me”. the page does not honour the offset, neither does it smoothly scrolls down to the anchor [it directly jumps there]

How do i resolve this issue?

Thanks
Rohit

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 8 years, 8 months ago Rohit Bhosle

    Just for more information, I’m on a Mac and building on Safari

  2. 8 years, 8 months ago SiteOrigin
    Hi, I Work Here

    Hi Rohit

    The challenge is that the required offset is different. The header is larger on mobile. I can get you a little closer with the following:

    #masthead[style] {
    	padding-top: 5px !important;
    	padding-bottom: 5px !important;
    }
    
    #masthead .site-branding {
        padding-right: 0 !important;
    }
    
    #masthead .container {
        padding: 0 5px;
    }
    

    Ideally the offset plugin would provide a different offset option for mobile.

    Unfortunately, for the moment, this is something we’d need to log as a feature suggestion.

  3. 8 years, 8 months ago Rohit Bhosle

    Yes thanks, this pretty much resolved the problem.

    I changed the plugin “hash link scroll offset” to Page id Scroll
    Its better, and work well with site origin. Just a heads up for you.

    Thanks
    Take care
    Rohit

  4. 8 years, 8 months ago Rohit Bhosle

    Changing the plugin and also adding your given CSS together resolved the issue.

    i just thought my earlier message was a bit ambiguous.

  5. 8 years, 8 months ago SiteOrigin
    Hi, I Work Here

    Ahh that’s great news! Thanks for sharing your final plugin solution with us, I’ve only ever used the first plugin you tried. I’ll definitely give Page ID Scroll a try soon.

    All the best.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More