By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,402 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,402 IT Pros & Developers. It's quick & easy.

How to remove scrollbar(s) without use of frames.

P: n/a
Hello all,

Is it possible to remove scrollbar(s) without using frames. Is there
any code which could be applied in body tag to remove scrollbar(s).

Thanks in adv,
Sujan

Jul 23 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
VK
IE and NN 8 only (I guess, at least not on FF):

window.document.body.scroll = 'no'; //hide
window.document.body.scroll = 'yes'; // show
window.document.body.scroll = 'auto'; // show only if needed

Jul 23 '05 #2

P: n/a
> "Sujan" <su*****@gmail.com> wrote:
news:11**********************@f14g2000cwb.googlegr oups.com....

Hello all,

Is it possible to remove scrollbar(s) without using frames. Is there
any code which could be applied in body tag to remove scrollbar(s).

Thanks in adv,
Sujan


Maybe css will work.

<body style="overflow:auto;">
--
BootNic Saturday, July 02, 2005 12:13 PM

Imagination was given to man to compensate him for what he isn't. A sense of humor was provided to
console him for what he is.
*Horace Walpole English novelist*

Jul 23 '05 #3

P: n/a

Why the need of it? Chances are there's no need, other than you're
getting scrollbars on a page whose content fits in 'YOUR SCREEN'. So,
you're pretty much just making it work for people who use your screen size
and resolution and maybe even color depth, which is quite cheesy, and I
can also bet you're using fixed units for the element positioning, and
thus the overflow and thus the scrollbars, which isn't the browser's deal
but yours. Is very easy to do, but is not the answer to the issue. Use
relative units for the positioning and code to the viewport, not your
monitor.
Danny

On Sat, 02 Jul 2005 09:13:52 -0700, BootNic <Bo*****@bounce.prodigy.net>
wrote:
"Sujan" <su*****@gmail.com> wrote:
news:11**********************@f14g2000cwb.googlegr oups.com....

Hello all,

Is it possible to remove scrollbar(s) without using frames. Is there
any code which could be applied in body tag to remove scrollbar(s).

Thanks in adv,
Sujan


Maybe css will work.

<body style="overflow:auto;">


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 23 '05 #4

P: n/a
"Sujan" <su*****@gmail.com> wrote:
news:11**********************@f14g2000cwb.googlegr oups.com....
Hello all,
Is it possible to remove scrollbar(s) without using frames. Is there
any code which could be applied in body tag to remove scrollbar(s).


If you don't need to remove the functionality but instead simply want to
eliminate the appearance, why not set the CSS such that the scrollbar and
its buttons blend into your background?:

<body text="#ffffff" link="#ffff00" vlink="#ffff00"
alink="#ff0000" bgcolor="#0000CC">
<STYLE TEXT="text/css">
<!--
body {scrollbar-face-color: #0000CC; scrollbar-shadow-color: #0000CC;
scrollbar-highlight-color: #0000CC; scrollbar-3dlight-color: #0000CC;
scrollbar-darkshadow-color: #0000CC; scrollbar-track-color: #0000CC;
scrollbar-arrow-color: #00000CC}
-->
</STYLE>

--
David Hayes

(remove the name of the programming language from email address to make it
usable)
Jul 23 '05 #5

P: n/a
Thanks,

This script works.

Sujan.

Jul 23 '05 #6

P: n/a
BootNic wrote:
"Sujan" <su*****@gmail.com> wrote: [...]
Is it possible to remove scrollbar(s) without using frames. Is there
any code which could be applied in body tag to remove scrollbar(s).


Maybe css will work.

<body style="overflow:auto;">


`overflow:auto' makes the UA to display scrollbars only if required which
is probably the default behavior, i.e. scrollbars will be displayed. One
*could* use `overflow:hidden' but I would not recommend that; rather check
the layout for errors and format the margins of the document body
accordingly.
PointedEars
Jul 23 '05 #7

P: n/a
Thomas 'PointedEars' Lahn wrote on 16 jul 2005 in comp.lang.javascript:
BootNic wrote:
"Sujan" <su*****@gmail.com> wrote: [...]
Is it possible to remove scrollbar(s) without using frames. Is there
any code which could be applied in body tag to remove scrollbar(s).


Maybe css will work.

<body style="overflow:auto;">


`overflow:auto' makes the UA to display scrollbars only if required
which is probably the default behavior, i.e. scrollbars will be
displayed. One *could* use `overflow:hidden' but I would not
recommend that; rather check the layout for errors and format the
margins of the document body accordingly.


Type this in the address bar:

javascript:document.body.style.overflow='hidden';v oid 0;

IE tested

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.