-
AuthorPosts
-
March 6, 2016 at 5:38 pm #826126
On my website I have navbar and breadcrumbs stuck to the top.
When I’m on my contact or news page for example and I scroll down it has this moment where it snaps and then the page shoots a bit up.When holding the scrollbar and slide it up and down you can really see this switching happening when you reach a certain point.
This is not very smooth and pleasant for visitors. Is it possible to make this transition smoother? N
http://foodforestry-development.nl/March 6, 2016 at 9:56 pm #826301Hi there,
Thanks for writing in! It’s because you are using fixed navbar that’s switching from relative positioning to fixed. You can make the navbar permanently fixed to avoid this.
You can add this under Custom > CSS in the Customizer..x-navbar { left: 0; position: fixed; right: 0; top: 0; } .x-main.full { margin-top: 50px; }
Hope this helps.
Cheers!
March 7, 2016 at 3:46 pm #827604Thanks for the suggestion. That does work, yet it also moves the navigation bar on the homepage to the top and fixes it there.
I’m using Ethos to have the bar first sit on the bottom with the opening screen and then later move to the top when scrolling down. when going to pages (other than home) I want to keep it at the top.
Hopefully you can provide me with another way to make this more smooth.
March 8, 2016 at 1:03 am #828139Hi,
Please change the code given above to this.
body.x-navbar-fixed-top-active .x-navbar-wrap { height: 103px; }
Hope that helps
March 11, 2016 at 1:54 pm #833954Thanks for the suggestion but it still has the snapping happening.
March 11, 2016 at 6:39 pm #834252Hello There,
Could you please use this custom css that adds a transition to the navbar?
.x-navbar, .x-navbar-wrap { transition: all 1s linear; }
Hope this helps.
March 12, 2016 at 12:05 pm #835014To bad,
it is still snapping
March 12, 2016 at 3:38 pm #835192Hi there,
It’s snapping depending on the speed of scroll. Let’s add this CSS
.masthead { min-height: 227px; } .x-navbar { transition: all 0.5s linear; top: -51px; position: static; } .x-navbar-fixed-top { top: 0 !important; position: fixed !important; }
Just need to remove “SearchSearch”, it’s not part of the calculation.
Hope this helps.
March 13, 2016 at 4:00 pm #836071He thanks again for the suggestion. It does sort of work but not entirely.
If I leave the
.masthead {
min-height: 227px;
}at 227px it makes it smoother.
But I have page title disabled and the 227px moves the page lower increasing the distance between navbar and the page below it.
when I make the masterhead 120px the snapping happens sort of again.Left it like this for you so you can see it for yourself
March 13, 2016 at 5:29 pm #836164Hi there,
Hmm, I can’t tell the difference. It’s smooth to my end. Would you mind providing a screen recording?
How about this,
.masthead { min-height: 120px; } .home .masthead { min-height: 227px; }
Thanks.
March 13, 2016 at 5:34 pm #836169Yes, you did it. Now it is super smooth with no glitchy point when selecting the scroll bar and move it down.
Before mousewheel was sort of smooth.
Now both are super smooth!
March 13, 2016 at 6:39 pm #836232Glad to hear that, my pleasure helping 😉
-
AuthorPosts