Obtaining size of the scrollbar

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joel

    Obtaining size of the scrollbar

    Is there anyway to obtain the width of the scrollbar? I've tried

    var sb = document.body.o ffsetWidth-document.body.c lientWidth ;

    but this does not appear to be correct.

    Thanks,
    Joel
  • DU

    #2
    Re: Obtaining size of the scrollbar

    Joel wrote:
    [color=blue]
    > Is there anyway to obtain the width of the scrollbar? I've tried
    >
    > var sb = document.body.o ffsetWidth-document.body.c lientWidth ;
    >
    > but this does not appear to be correct.
    >
    > Thanks,
    > Joel[/color]

    For which browsers? and which browser versions? and for which rendering
    mode?
    Does your question really matter if your webpage design is scalable?

    DU

    Comment

    • Mike Foster

      #3
      Re: Obtaining size of the scrollbar

      Joel wrote:[color=blue]
      > Is there anyway to obtain the width of the scrollbar? I've tried
      > var sb = document.body.o ffsetWidth-document.body.c lientWidth ;
      > but this does not appear to be correct.[/color]


      Visit the following page with different browsers to see what you're up against ;-)

      Comment

      • Joel

        #4
        Re: Obtaining size of the scrollbar

        Thanks for the info. I'll check it out.

        Joel
        "Mike Foster" <mikeNOSPAM@mfo sternospam.com> wrote in message news:<opsavs7e0 6vseoz3@p42000> ...[color=blue]
        > Joel wrote:[color=green]
        > > Is there anyway to obtain the width of the scrollbar? I've tried
        > > var sb = document.body.o ffsetWidth-document.body.c lientWidth ;
        > > but this does not appear to be correct.[/color]
        >
        >
        > Visit the following page with different browsers to see what you're up against ;-)
        > http://cross-browser.com/x/test/clientheight.html[/color]

        Comment

        Working...