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

Discussion in 'Javascript' started by Sujan, Jul 2, 2005.

  1. Sujan

    Sujan Guest

    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
     
    Sujan, Jul 2, 2005
    #1
    1. Advertising

  2. Sujan

    VK Guest

    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
     
    VK, Jul 2, 2005
    #2
    1. Advertising

  3. Sujan

    BootNic Guest

    > "Sujan" <> wrote:
    > news:....
    >
    > 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*
     
    BootNic, Jul 2, 2005
    #3
  4. Sujan

    Sujan Guest

    Thanks,

    This script works.

    Sujan.
     
    Sujan, Jul 5, 2005
    #4
  5. BootNic wrote:

    >> "Sujan" <> 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
     
    Thomas 'PointedEars' Lahn, Jul 16, 2005
    #5
  6. Sujan

    Evertjan. Guest

    Thomas 'PointedEars' Lahn wrote on 16 jul 2005 in comp.lang.javascript:

    > BootNic wrote:
    >
    >>> "Sujan" <> 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';void 0;

    IE tested

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
     
    Evertjan., Jul 16, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Don Schneider
    Replies:
    0
    Views:
    2,011
    Don Schneider
    Jun 27, 2003
  2. ws
    Replies:
    3
    Views:
    937
    Neredbojias
    Aug 20, 2005
  3. Replies:
    3
    Views:
    411
    dorayme
    Apr 16, 2006
  4. Brian Cryer
    Replies:
    10
    Views:
    3,339
    dorayme
    Feb 16, 2007
  5. Alex

    ScrollBar? Does it exist just WEB ScrollBar Control?

    Alex, Apr 1, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    275
    Alvin Bruney [MVP]
    Apr 4, 2004
Loading...

Share This Page