Forum Moderators: open

Message Too Old, No Replies

Hide scrollbar when not needed

         

bbks

5:13 pm on Jun 13, 2005 (gmt 0)

10+ Year Member



Hi!

I would like to know if there is any way to hide the scrollbars when they arenīt needed, and come back when they are needed. Now the scrollbars just become grey when they are inactive but i want them to dissapear.

coopersita

7:26 pm on Jun 13, 2005 (gmt 0)

10+ Year Member



You need to be more specific. Which scrollbars? is it an i-frame or div with overflow?

Which browser/version are you using.

If it's the whole page, you shouldn't have any scrollbars.

bbks

8:11 pm on Jun 13, 2005 (gmt 0)

10+ Year Member



The web page is built on frames. In one frame I have links to other pages. At 1024*768 or higher that frame donīt need any scrollbars but they are still there (grey). I would like to have them removed when they donīt do anything. But at 800*600 scrolling is needed and they should work like normal. I just tried Firefox and that browser fixes this automatically and I think it is the same with Netscape. The problem is just with IE.

I have seen this on other sites and it is probably fixed with some kind of Javascript but i havenīt found anything useful.

bbks

9:15 am on Jun 16, 2005 (gmt 0)

10+ Year Member



One way would be if a javascript could change the color of the scrollbar to the backgroundcolor of the page when the scrollbar is not in use and change it back when it is in use. Is this possible to do with a javascript? Anyone could give me a hint how the code looks like because I am not so good with javascripts.

But first of all, is this possible?

Sathallrin

4:36 pm on Jun 16, 2005 (gmt 0)

10+ Year Member



One solution, is on the page inside the frame put this code:

<style type="text/css">
html,body {
height:100%;
width:100%;
overflow:auto;
}
</style>

You can do this on all pages you own. The only thing this wont work on, is if it is a page you do not own inside your frame window (not usually a good idea to do anyways).

bbks

8:35 pm on Jun 16, 2005 (gmt 0)

10+ Year Member



Thank you very much!

bbks

9:11 pm on Jun 16, 2005 (gmt 0)

10+ Year Member



Hmm.... Now IE shows it just as I like it to be, but now FF shows scrollbars for no reason. Anyone know how to fix this? I know IE and FF read stylesheets in different ways and I wonder if anyone knows how to fix it.

Sathallrin

10:44 pm on Jun 16, 2005 (gmt 0)

10+ Year Member



Try this one

html {
overflow:auto;
}

bbks

9:07 am on Jun 17, 2005 (gmt 0)

10+ Year Member



Thank you! Now everything works like it should.