Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. disable scrolling on single page

disable scrolling on single page

Scheduled Pinned Locked Moved General Discussion
7 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    FesT
    wrote on last edited by FesT
    #1

    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

    1 Reply Last reply
    0
    • mariusjopenM Offline
      mariusjopenM Offline
      mariusjopen
      Global Moderator
      wrote on last edited by
      #2

      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

      www.mariusjopen.world

      F 1 Reply Last reply
      0
      • mariusjopenM mariusjopen

        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

        F Offline
        F Offline
        FesT
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • mariusjopenM Offline
          mariusjopenM Offline
          mariusjopen
          Global Moderator
          wrote on last edited by
          #4

          Dear @FesT
          I don't quite understand what you mean.

          Best!

          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0
          • F Offline
            F Offline
            FesT
            wrote on last edited by FesT
            #5

            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

            1 Reply Last reply
            0
            • mariusjopenM Offline
              mariusjopenM Offline
              mariusjopen
              Global Moderator
              wrote on last edited by
              #6

              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

              www.mariusjopen.world

              1 Reply Last reply
              0
              • mariusjopenM Offline
                mariusjopenM Offline
                mariusjopen
                Global Moderator
                wrote on last edited by
                #7

                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-javascript

                Best!

                Marius

                www.mariusjopen.world

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                I also code custom websites or custom Lay features.
                💿 Email me here: 💿
                info@laytheme.com

                Before you post:
                1. When using a WordPress Cache plugin, disable it or clear your cache.
                2. Update Lay Theme and all Lay Theme Addons
                3. Disable all Plugins
                4. 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:
                1. Post a link to where the problem is
                2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                Online Users
                M
                margotlego
                Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                laytheme.com
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Recent
                • Tags
                • Popular
                • Users
                • Search