homepage Welcome to WebmasterWorld Guest from 54.197.171.109
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
how hide scroll bar in the web pages?
how hide scrol bar in the web pages?
abbas13




msg:3369474
 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




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

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




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

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




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

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




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

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




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

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




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved