Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7506665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:19:42+00:00 2026-05-29T22:19:42+00:00

I can get window.innerHeight on Chrome. 1, How to get this property on IE7

  • 0

I can get window.innerHeight on Chrome.

1, How to get this property on IE7 via pure JS?

2, How to get this property on IE7 via jQuery?

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T22:19:43+00:00Added an answer on May 29, 2026 at 10:19 pm
    1. Pure JS is difficult; so you’ll need a script for that:

      http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/

    2. jQuery on the other hand, is as simple as typing this:

      $(window).height();
      

    JS Fiddle link for a live demo

    Note: The window size is the size of the result section in JS Fiddle.

    Update 1

    I found a script that finds the scrollbar size from JQuery Dimensions should have a method to return the scrollbar size:

    jQuery.getScrollBarSize = function() {
       var inner = $('<p></p>').css({
          'width':'100%',
          'height':'100%'
       });
       var outer = $('<div></div>').css({
          'position':'absolute',
          'width':'100px',
          'height':'100px',
          'top':'0',
          'left':'0',
          'visibility':'hidden',
          'overflow':'hidden'
       }).append(inner);
    
       $(document.body).append(outer);
    
       var w1 = inner.width(), h1 = inner.height();
       outer.css('overflow','scroll');
       var w2 = inner.width(), h2 = inner.height();
       if (w1 == w2 && outer[0].clientWidth) {
          w2 = outer[0].clientWidth;
       }
       if (h1 == h2 && outer[0].clientHeight) {
          h2 = outer[0].clientHeight;
       }
    
       outer.detach();
    
       return [(w1 - w2),(h1 - h2)];
    };
    

    The only problem left is it always adds the scrollbar width & height to the dimensions, regardless if there is a scrollbar or not. One solution to fix this problem is to detect when there is overflow in a web page, and at what dimension (vertical or horizontal).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't find any solution to get this jquery events to work. $(window).one('click',function(){ console.log('hide
This is my first time using a JFrame. I can't get the window to
How can you get the window.innerHeight in internet explorer. Thanks.
Can we get the Window's menubar property value using javascript
I can get window.document but how can I get document.window ? I need to
How I can get window position(xy) and size in extjs 4.
In Watir you can get WIN32OLE handle of IE window using next method. irb(main):059:0>
This is frustrating me. It should be something really simple but I can't get
How can I get accurate window information in Linux? I know that I can
How can I get the window handle by giving the process name or window

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.