Back to Top
The nuts and bolts for
Creative web development

AutoScroll

How do you get rid of those "ghost scrollbars" when a page needs no scrollbars?

Set the Scroll property to "auto" in the body tag to get rid of those "ghost scrollbars" that appear along the right side of the window when a page needs no scrollbars.

Example:
<body scroll="auto">

When you have a page that needs no scrollbars, then the scrollbars will not appear along the right side of the window.
When you have a page that needs scrollbars, then the scrollbars will appear as normal along the right side of the window.

Share this Article

Comments

still space when using autoscroll

I noticed some space when using the autoscroll. The space for the scrollbar is still in the page although you can't see it. A centrered table for example won't centre completely because there is some 'gost' space where the scroll bar might come if the table is excessing the pageformat...

Two extensions

The "ghost scrollbars" are wieved only with IE, so the attribute is ignored by Opera and Netscape.

Two extensions are available at http://www.massimocorner.com both written by Massimo Foti:

  • Set IE Scrollbar, a Command full of time-saving options;
  • Body Inspector, a Property Inspector

What seems curious to me is that, albeit you can set all the body attributes with CSS and, since vers.5.5, IE support scrollbar styles (to create coloured scrollbars), there is not such a style about scrolling options.

Marcello