1. HOT Divi Ultimate Header Plugin - Design Divi custom header globally in Divi Builder: https://header.diviultimate.com/

Problem with fixed header on mobile

Discussion in 'Get Help On Divi Wordpress' started by Piotr G, Nov 7, 2019.

  1. Piotr G

    Piotr G New Member

    Hi,
    I am using Divi in one of my one-pager websites - fotpg.pl/streetszef/
    I have configured a fixed header with menu (allowing to navigate through page sections by scroll) and it works perfectly fine on desktop.
    When on mobile, it does not scroll to the proper location - the scroll goes to the beginning of the section but it's on top of the screen so the first part of it is covered by the header with menu.
    However, if the main page is loaded for the first time (or refreshed without any #anchor in url) it loads fine for the first section, so it's clearly the navigation.

    Example attached in screenshots (when clicked in "O NAS" in top menu).

    I would appreciate any help how to fix it!

    Let me know in case of any questions.
     

    Attached Files:

  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    It seems like it works fine now on your site. Perhaps you already solve it.

    For me, I would suggest to try this: WP Admin > Divi > Theme Options > Navigation > General Settings > Alternative scroll-to-anchor method
     
  3. Piotr G

    Piotr G New Member

    Hi,
    The "Alternative scroll-to-anchor method" is already on.
    Unfortunately I have figured out that the JavaScript code supporting this feature is explicitly disabling it on mobile screens.

    I have found a way of dirty fixing it by modifying the Divi JS files (screenshots), but I don't like this solution as it will break when I updated the DIVI version.

    In case you have some better ideas, please let me know! Thanks a lot!
     

    Attached Files:

  4. Divi.Help

    Divi.Help Administrator
    Staff Member

    You could try to copy the JS code to Divi > Theme Options > Integration > Body Code & see if it works.
     

Recommended Divi Hosting