Click to See Complete Forum and Search --> : Disable scroll bar


justin001
01-12-2004, 05:12 AM
Hi, I know this isn't directly realted to javascript, but I have made a script scroll a layer containing pictures across the screen (kind of like an image slider or maurquee), but now whenever a new image is appended to the scrolling div (by innerHTML), the bottom scrollbar appears because the div is now wider than the browser window. Is there any way to clip images to fit the window, or to just disable the horizontal scrollbar so the page is not scrollable on the x axis? Thanks in advance...
Justin

Kor
01-12-2004, 05:42 AM
use CSS style:

overflow-x:hidden

or, if you want to change it dinamically, on the fly, use:

document.getElementById('divs_id').style.overflowX = 'hidden'

justin001
01-12-2004, 06:44 AM
Thanks Kor for the quick response. I tried your method which works hundreds in IE, but not at all in Opera or Netscape. Thanks anyway, great solution!