Welcome to WebmasterWorld Guest from 18.206.168.65

Forum Moderators: open

Message Too Old, No Replies

Hide scrollbar when not needed

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

New User

10+ Year Member

joined:June 13, 2005
posts:7
votes: 0


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.

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

Junior Member

10+ Year Member

joined:June 9, 2005
posts:190
votes: 0


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.

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

New User

10+ Year Member

joined:June 13, 2005
posts:7
votes: 0


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.

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

New User

10+ Year Member

joined:June 13, 2005
posts:7
votes: 0


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?

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

Junior Member

10+ Year Member

joined:June 16, 2005
posts:89
votes: 0


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).

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

New User

10+ Year Member

joined:June 13, 2005
posts:7
votes: 0


Thank you very much!
9:11 pm on June 16, 2005 (gmt 0)

New User

10+ Year Member

joined:June 13, 2005
posts:7
votes: 0


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.
10:44 pm on June 16, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:June 16, 2005
posts:89
votes: 0


Try this one

html {
overflow:auto;
}
9:07 am on June 17, 2005 (gmt 0)

New User

10+ Year Member

joined:June 13, 2005
posts:7
votes: 0


Thank you! Now everything works like it should.