Site logo

[Resolved] Sticky Navigation Shifting Main Content

Home Forums Support [Resolved] Sticky Navigation Shifting Main Content

Home Forums Support Sticky Navigation Shifting Main Content

  • This topic has 17 replies, 4 voices, and was last updated 5 years ago by David.
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #1720300
    Austin

    Is it possible to keep the main content page from shifting down when the sticky navigation takes effect? When the primary navigation disappears and the sticky navigation comes into view, the content pages shift down. This is causing an CLS error.

    Thanks

    #1720393
    Leo
    Staff
    Customer Support

    Hi there,

    Are you using any transition effects?

    #1720412
    Austin

    Hey Leo,

    I have tried all 3 options associated with the sticky header (none, fade, slide) and all throw the same issue…

    #1720777
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to the site where we can see the issue ?

    #1720789
    Austin

    Hey David,

    The site is: https://golfhomes.servebolt.us/

    I am not sure if they are related, but the issue is much more exaggerated on mobile devices.

    Thanks,

    #1721209
    David
    Staff
    Customer Support

    I am not seeing any issue with the Sticky Navigation.
    What i do see is the main content styles being loaded after the page is first rendered. This is due to the WP Rocket Critical (optimized) CSS delivery option. Unless you know how to manually generate the required CSS you should disable that feature.

    #1721259
    Austin

    Hey David,

    I have tried your suggestion and it hasn’t changed anything. I am not sure if you are using safari or chrome? I have sourced the problem to the sticky navigation due to when it is on, the page shifts, when it’s off the page doesn’t shift down. Even if not looking to address the CLS issue, can the the page shift issue be fixed or is it just part of the sticky?

    #1721263
    Austin

    I have logged out and tested on both safari and chrome and it seems to be an issue in only safari and iOS.. Any suggestions on how to address this or its just the way it is? Thanks again for the help

    #1721434
    Elvin
    Staff
    Customer Support

    Hi there,

    I’ve checked your site as well and I don’t see this issue as well. Here’s what I see on my end:
    https://share.getcloudapp.com/mXup7lyl

    As you can see in the video, there are no weird “jumps” or “shifts”. But perhaps we’re missing something.

    Any chance you could provide a screen recording of what you see as a “shift”? The sticky feature sets the navigation as “position: fixed;” when it’s not on the top of the page and then swaps back to “position: static” when it’s back to the top.

    #1721437
    Austin

    Hey Elvin,

    Yeah I don’t mind sharing a screen shot of what I see on my end. Do I use the same program you are using?

    #1721454
    Elvin
    Staff
    Customer Support

    Hey Elvin,

    Yeah I don’t mind sharing a screen shot of what I see on my end. Do I use the same program you are using?

    You can stick w/ what you want to use.

    I personally use CloudApp but others prefer to use Loom and/or Screencast. 🙂

    #1721469
    Austin

    Hey Elvin,

    See if this works? I tried a screen recording to show what I see on my side. Maybe Im just being picky, but the page content shifts down, and when scrolling back up there is a large delay white space before the header reappears.

    #1721470
    Austin
    #1721473
    Austin

    It seems to work smooth on google chrome desktop, but still choppy like the video shows on safari desktop, iOS safari mobile, and chrome mobile

    #1721774
    David
    Staff
    Customer Support

    Aah it only shows up on smaller devices – and the reason for that is the Search widget is added to the Sticky Nav Placeholder which increases its height. Add this CSS to stop that from interfering:

    #sticky-placeholder .sidx-container {
      height: 0;
      display: none;
    }
Viewing 15 posts - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.