Forum Moderators: open

Message Too Old, No Replies

Scrolling bar issue

         

Optimisti

12:23 am on Dec 4, 2003 (gmt 0)

10+ Year Member



Is there a way to get rid of the vertical scrolling bar when it's not necessary? I mean: to totally hide the scrolling bar when the content does not overflow.

Elijah

12:31 am on Dec 4, 2003 (gmt 0)

10+ Year Member



Mozilla does this by default :+)

But here you go:


<style type="text/css">
body {overflow-y:hidden;}
</style>

Edit:
The the following code is better as it will make the scrollbar reappear if it's needed.

<style type="text/css">
body {overflow:auto;}
</style>

Elijah

Optimisti

12:52 am on Dec 4, 2003 (gmt 0)

10+ Year Member



Yes. This does the trick as long as the content does not overflow. Thank you! But it wasn't the answer I was looking for.

Maybe I didn't make my point clear.

I want to hide the scrolling bar from users with screen resolution 1024x768 or higher but to show it to users with lower resolution. With the code you provided the good old 800x600's will miss the overflowing content.

So is there a way to hide the scrolling bar ONLY when NOT needed.

EDIT: The latter value was the one I was looking for. I wonder why I didn't figure that out.

Thank you very much.

R1chard

11:18 am on Dec 5, 2003 (gmt 0)

10+ Year Member



Opera also does this by default. So does OffByOne, Mosaic and even MS Paint! Shouldn't all software work this way? Looks like IE is the only one that wastes screenspace in this way.

TryAgain

4:01 pm on Dec 5, 2003 (gmt 0)

10+ Year Member



In IE, the scrollbar seems to be part of the "canvas", whereas in Opera it does not.