disable scrolling on single page
-
How can I disable scrolling on a single page?
body[data-id="10"][data-type="page"]{overflow: hidden !important;}
is not working.html {overflow-x: hidden; overflow-y: hidden;}
Is working, when I insert it on a single page over a external plugin into the header. But I want to avoid that plugin.Best,
Felix -
Dear @FesT
you can use the slug to apply the CSS.
Fore example
.slug-home { height: 100vh; overflow: hidden; }Let me know if that worked :-)
Best!
Marius
-
Dear @FesT
you can use the slug to apply the CSS.
Fore example
.slug-home { height: 100vh; overflow: hidden; }Let me know if that worked :-)
Best!
Marius
Dear @mariusjopen,
thanks for your reply. Yes that works. But what can I use if the page is broader and higher then the actual viewport? And I still wont allow the scrolling?
Best Felix -
-
Dear @mariusjopen,
sorry that I write so incomprehensibly.
I try to clarify: I have a page wich is for example 5000 px high and 4000px width with a viewport of lets say 2880x1800px. I want to disable the scroll, but still want to be able to allow the viewport to move over the whole page via another script using the mouse. So I can't use height: 100vh this causes, that the script wont work anymore... You can see the situation here
I hope you get now what my problem is.Best
Felix -
Dear @FesT
ok. I understand.You want to scroll with a script but not with the mouse.
I do not know a function or option what will do that.
But there might be a solution online. Look for: Disable mouse scroll…Sorry I can not help you much more now.
Best!
Marius
-
Dear @FesT
the code is a bit complex to understand on the first glimpse.Are you able to make some comments.
Did you have a look here under Binding Click Elements?
http://laytheme.com/documentation.html#custom-javascriptBest!
Marius
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login