Welcome to WebmasterWorld Guest from 54.166.222.116

Forum Moderators: incrediBILL

Message Too Old, No Replies

how hide scroll bar in the web pages?

how hide scrol bar in the web pages?

     
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?

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

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ 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.

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.

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

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ 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.

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Ö :)

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

5+ 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

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

WebmasterWorld Senior Member vincevincevince is a WebmasterWorld Top Contributor of All Time 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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month