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 @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
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it