1. PROMO Upgrade to Pro Membership @ $99 / Lifetime & access all our 16+ premium Divi extensions: Divi Block, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Solved Extra or overlapped space appearing between website's menu bar and sections

Discussion in 'Free Divi Community Forum' started by andalltha, Jan 10, 2024.

  1. andalltha

    andalltha Member

    Hello there!

    I created this website with Divi: https://couragebxl.be/. When I click on menu's items, sometimes a white space appears between the menu bar and the target section, sometimes the menu bar is overlapping the section's top, depending on the screen size. The extra space and the overlapped one look like they have the same height than the section's one. How can I fix this?

    Thank you very much in advance.
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade rolling text design for your Divi site without using any plugins:View Demo
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    You may check this out & see if it works: https://divi.help/threads/offset-anchor-link.6937/#post-22392

    You will need to change the below:

    var headerHeight = 143;

    into

    var headerHeight = 83;
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade testimonial carousel design for your Divi site without using any plugins:View Demo
  3. andalltha

    andalltha Member

    Thank you very much! Looks like it works but only on desktop. There's still a gap appearing on mobile...
     
  4. Divi.Help

    Divi.Help Administrator
    Staff Member

    Your header height is 94px. So you should use var headerHeight = 94;
     
    1. PRO MEMBER PERKS Divi.Help Pro Layout Packs - Beautifully crafted Divi layout packs for you to kick start your Divi sites:View Demo
  5. andalltha

    andalltha Member

    Thank you very much. I tried different ways to use var headerHeight = 83; on desktop and var headerHeight = 94; on mobile but nothing works. Do you know a way to achieve it?
     
  6. Divi.Help

    Divi.Help Administrator
    Staff Member

    I checked your site on my iPhone & the anchor link seems to work just fine.
     
    1. PRO MEMBER PERKS Divi Ultimate Footer Plugin - Custom global Divi footer (20 premade styles) + Revealing footer effect:Learn More
  7. andalltha

    andalltha Member

    Great, thanks again!