skip to Main Content

I need to prevent scroll on a webpage, is it possible?
I’ve tried to setup my index.css like this, but it did not work

body {
 position:fixed
}

3

Answers


  1. you just need to set this property

    body { overflow: hidden; }

    it works fine to me 😉

    Login or Signup to reply.
  2. try adding this to your css:

    body {
      overflow: hidden;
    }
    
    Login or Signup to reply.
  3. use overflow as hidden or you can use padding auto from the y-axis so all the content is justified successfully.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search