Hi

I want to disable in HTML a vertical scroll bar .
Is any ideas how to do this ?


Thank you for your effort of reading .

Dani AI

Generated

Short answer: control scrolling with CSS, not old frame or non‑standard HTML attributes. asked how to remove the vertical scrollbar; replies from and pointed at framing and legacy attributes. Those approaches are brittle, often obsolete, and hurt accessibility. Modern practice is to use CSS and responsive layout so the page either fits the viewport or scrolls only inside a controlled container.

If you truly need to prevent page scrolling, apply overflow control to the root. This removes all page scroll (use with care — it can trap keyboard and assistive‑technology users):

html, body {
  height: 100%;
  overflow: hidden;
}

A safer pattern: keep the page scrollable but confine long content to a scrollable region. That preserves keyboard/touch behavior and gives you predictable layout:

.app-wrap {
  max-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

Notes and cautions:

  • Hiding scrollbars globally will break keyboard navigation and can confuse users. Test with keyboard, screen readers, and on phones.
  • If you only want to hide the visual scrollbar but keep scrolling active, use browser-specific techniques (Firefox scrollbar-width, WebKit ::-webkit-scrollbar) — those affect discoverability and should be used sparingly.
  • Avoid framesets and deprecated scrolling attributes; they are not recommended for modern sites.

For background on the DOM vs HTML and modern layout/scroll handling, see the MDN entries on the DOM and on CSS overflow: Document Object Model (DOM) — MDN CSS overflow — MDN.

Recommended Answers

All 5 Replies

This option is only available to FRAME and IFRAME (scrolling).
Scrolling as far I know, can not be use with any other tags. Your only chance to disable any scrolling is to design pages to 800 x 600 and then just ajust content position by relative positioning.

Ok , i know in framing . Your site have a mistake because they did not include " " or they have a something that i do not know .
example
scrolling = "no"
OK if my chance is set resolution then , HTML tags does not have that attribute possible said
http://www.w3schools.com/tags/ref_standardattributes.asp
Then how did you think to set resolution then ?

Thanks for your replay .

1) Create one site with resolution 800x600 and use relative positioning to place it in the middle. Not pretty but you certain that there is no scrolling, it will happens only if somebody still use lesser resolution then this ( I do not think there is anyone)
2) Use browser detection script that can check on user resolution and use css file assign to this resolution (you need to buy a plugin or you may want to code it)

PS: Linked site is official documentation by w3.org ;)

Ok , I used frames to divide a page ?You can see in
By the way , is HTML an object ?

HTML:
...
<body scroll="no">
...

And you should add this code in your css for IE:

CSS:
...
body{scroll: no;}
...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.