- This topic has 9 replies, 3 voices, and was last updated 3 years, 12 months ago by
David.
-
AuthorPosts
-
April 5, 2022 at 3:58 pm #2179236
Annamari
Hi,
I tried to search for a similar problem in the forum, but couldn’t find any.
When I scroll back to top, a strange “bump” happens when the secondary menu changes back to the original header, and I can see two logos at the same time for a second. (URL in the private area.)
What causes this? How can I get rid of it?Thanks,
AnnamariApril 5, 2022 at 6:14 pm #2179288Fernando Customer Support
Hi Annamari,
I can’t seem to replicate the issues you’ve mentioned from my end. The transition from the sticky navigation to the “non-sticky” navigation seems smooth when the back-to-top button is pressed.
This may potentially be a caching issue. Can you try clearing your browser’s cache? If this doesn’t work, can you try viewing the site from a different browser or device to completely rule out browser caching as the cause of the issue?
Kindly let us know how it goes. 🙂
April 6, 2022 at 10:23 am #2180182Annamari
Hi Fernando,
I checked it in a different browser/device and I can still experience the problem.
It happens when scrolling back to top manually, more slowly, not with the back-to-top button.
I’m attaching an image of it in the private area.
April 6, 2022 at 5:25 pm #2180418Fernando Customer Support
I see. That’s actually the default behavior/design when Sticky Navigation is used.
For instance, here is my test site: https://share.getcloudapp.com/8LuDpE7Y
If you would like an alternative, you can do away with the Sticky navigation and make the navigation fixed instead.
For instance: https://share.getcloudapp.com/9ZumDOxv
To do this, as mentioned, first disable the Sticky Navigation. Then, add this CSS in Appearance > Customize > Additional CSS:
body { padding-top: 88px; } header#masthead { position: fixed; top: 0; z-index: 10000; width: 100%; }Here is an article with regards to adding CSS: https://docs.generatepress.com/article/adding-css/#additional-css
Adding this through additional CSS should work.
If you wish to apply this fixed nav on Desktop only, use this instead:
@media (min-width: 1025px) { body { padding-top: 88px; } header#masthead { position: fixed; top: 0; z-index: 10000; width: 100%; } }Hope this clarifies! 🙂
April 7, 2022 at 4:50 am #2180866Annamari
Hi Fernando,
Thanks!
I’m using the same function on a different site (link in private info box), and it doesn’t happen there… So that’s why I don’t understand.
Thanks for your suggestion anyway!
April 7, 2022 at 5:14 am #2180883David
StaffCustomer SupportHi there,
if you want to re-enable the sticky navigation i can take a closer look.
April 7, 2022 at 5:16 am #2180887Annamari
Hi David,
re-enabled, thank you.
April 7, 2022 at 5:40 am #2180899David
StaffCustomer SupportIts annoying ‘bug’.
The sticky nav is a clone of the default navigation. And when the sticky appears it adds 40px left and 40px right padding to the inside-navigation container.
Which is fine for the sticky, but NOT the default nav, this extra padding causes the menu items to reflow and wrap to two lines so its now double the height and prone to peaking out when you scroll back to top and causes the annoying little bump.The other site is ok, as there is more space in the navigation to accommodate the padding without causing reflow.
Options:
1. makes some more space in the menu by reducing the menu item font sizes or menu item widths ( in customizer > Layout > Primary Nav ).
2. enable the Navigation as Header option in Customizer > Layout > Header. If need be we can throw some CSS at it to make it look more like the current nav.Let me know
April 7, 2022 at 7:54 am #2181195Annamari
Thank you, David, I enabled the Navigation as Header option, and now it seems OK to me!
Appreciate your help, thanks again!
April 7, 2022 at 7:58 am #2181206David
StaffCustomer SupportGlad to hear that!
The Nav as Header is the best option 🙂 -
AuthorPosts
- You must be logged in to reply to this topic.