Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

browser properties

Status
Not open for further replies.

slimwadie

IS-IT--Management
Feb 16, 2005
4
GB
Is there a way to turn the scrollbar on the browser off when a user arrives at your site - without opening the site in a new window? I have seen it done but cannot figure out from the code how it is made to do this.
 
the easiest way is to use css.

in your stylesheet use

body{overflow:hidden;}

or in your body tag use

<body style=&quot;overflow:hidden;}

you can also set this property for individual scrollbars like this

body{overflow-x:hidden; overflow-y:visible;}

however be careful when doing this to specift both the x and y scrollbars or ie5 will get confused.

There is a third property for scollbars which is auto

body{overflow:auto;}

this will display a scrollbar only when neccessary. However this will break netscape6 when used on the body tag so it is inadvisable to use it like this at the moment.

hope this helps

rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top