How to get the width of the viewport without scrollbars on firefox?

Discussion in 'Javascript' started by Me, Jul 6, 2007.

  1. Me

    Me Guest

    Or must we subtract it ourselves?
    It seems that window.innerWidth includes the width of the scrollbars
    if existing.

    3ks
     
    Me, Jul 6, 2007
    #1
    1. Advertising

  2. On Jul 5, 10:38 pm, Me <> wrote:
    > Or must we subtract it ourselves?
    > It seems that window.innerWidth includes the width of the scrollbars
    > if existing.
    >


    try
    document.documentElement.clientWidth
    or
    document.documentElement.offsetWidth
    or
    document.body.clientWidth
     
    scripts.contact, Jul 6, 2007
    #2
    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. Steffen Loringer

    Get width of scrollbars

    Steffen Loringer, Feb 6, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    370
    Steffen Loringer
    Feb 6, 2004
  2. Charles Packer
    Replies:
    2
    Views:
    795
    Sudsy
    Nov 5, 2003
  3. Replies:
    1
    Views:
    163
    Randy Webb
    May 17, 2006
  4. Replies:
    2
    Views:
    98
  5. Stefan Brückner

    Vertical viewport without scrollbars?

    Stefan Brückner, Apr 25, 2007, in forum: Javascript
    Replies:
    1
    Views:
    88
    Stefan Brückner
    Apr 25, 2007
Loading...

Share This Page