Forum Moderators: open

Message Too Old, No Replies

how hide scroll bar in the web pages?

how hide scrol bar in the web pages?

         

abbas13

1:56 pm on Jun 16, 2007 (gmt 0)



the right of each page there are a scroll bar for see full pages and u can up and down it!
but i want hide it in my pages

how i can?

penders

11:15 am on Jun 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



IE6 will display the greyed out scrollbar on the page even if the content fits. FF and Opera will only display the scrollbar if the content spills out of the viewport.

In FF and Opera you can get rid of the scrollbar (even if the scollbar *should* appear) by setting:

body { 
overflow:hidden;
}

But you won't get able to get at the contents which is out of view! In IE6 the scrollbar will ALWAYS show on the body.

Setek

1:14 am on Jun 18, 2007 (gmt 0)

10+ Year Member



Actually, it’s not that IE will always display the scrollbar, it’s that the scrollbar isn’t on
body
:)

It’s actually on

html
in IE. Which is wrong, I’m pretty sure: I think it’s meant to be on
body
.

Anyway, update it to this:

html, body { overflow: hidden; }

… and IE 6 and 7 will remove the scrollbar just fine.

penders

7:02 am on Jun 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Actually, it’s not that IE will always display the scrollbar, it’s that the scrollbar isn’t on body :)

It’s actually on html in IE. ...

Ah, OK, thanks for the clarity! :)

I notice that in IE6 (may be 7?) that you can still get at the hidden contents by selecting the content and moving up/down with the mouse. But not in FF or Opera.

Setek

7:21 am on Jun 18, 2007 (gmt 0)

10+ Year Member



Yep, that happens in IE 7 too :)

I tend to avoid a practice like this just for kicks (for instance if someone wanted their own customised scrollbar colours etc) because it’s a user interface control that should not be mucked with by designers.

I could quote Spiderman right now but I think I’ve done it before and I’ll just sound like an old man repeating stuff I’ve already said… :)

qasimali82

8:59 am on Jun 21, 2007 (gmt 0)

10+ Year Member



Their is a problem with. Once you resize the window, the scrollers never appears and the content are not fully showed. It will be better it you use following.

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

Once you resize the window, ithe scrollers will be displayed automatically.

Regards
Qasim Ali

vincevincevince

9:17 am on Jun 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



abbas13... I'm mighty glad I've not encountered your site using my PDA, or the ancient laptop I keep in my room which only does 640x480px.