Home / code / shell / scripts

Hide the scrollbar

Writer: Christophe Wolfs
Published: 22 April 2008

This is a little script to hide the scrollbars.

I have put it on auto, so it shows hide when needed. You can also put it on hidden (always hidden) or scroll (always shown).

<script language="Javascript">
<!-- start
function cssVerScrolls(val)
{
  document.body.style.overflowY=val;
  document.body.style.overflowX=val;
}
// end -->
</script>

Don't forget to call the function in the body-tag. 
<BODY onLoad="javascript: cssVerScrolls('auto');">

 

TOP