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 8232187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:44:48+00:00 2026-06-07T17:44:48+00:00

If course it seems scrollIntoViewIfNeeded is a feature tendered only by WebKit. However I’m

  • 0

If course it seems scrollIntoViewIfNeeded is a feature tendered only by WebKit. However I’m working on something that needs to be compatible with IE back to 7, and I need to detect whether something is visible, and if not, then call scrollIntoView() on it.

It’s also important to note that I’m not dealing with whole windows, I could be dealing with a smaller DIV in which an element may be scrolled out of the viewable box.

For example, the element with id “pleaseFindMe” should be scrolled into view only if overflowed out of the viewable area of the div.

    <div style='border:1px solid black;width:40%; overflow:scroll;'>
        <span id='e2' style='white-space: nowrap;' >Lorem ipsum aliqua proident veniam et quis consectetur esse dolore non Ut nulla dolor eu culpa. Lorem ipsum sint cupidatat non et adipisicing esse elit officia. proident, sunt in culpa qui officia deserunt mollit anim <span id='pleaseFindMe'>id est</span> laborum. </span>
    </div>  
  • 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-06-07T17:44:50+00:00Added an answer on June 7, 2026 at 5:44 pm

    IE has supported the beautiful element method getBoundingClientRect since IE4. Although it has some minor flaws in IE<8, it can definitely be used for your purpose.

    So here’s the trick:

    var findMe = document.getElementById("pleaseFindMe"),
        contRect = container.getBoundingClientRect(),
        findMeRect = findMe.getBoundingClientRect();
    if (findMeRect.top < contRect.top || findMeRect.bottom > contRect.bottom
           || findMeRect.right > contRect.right || findMeRect.left < contRect.left)
        findMe.scrollIntoView();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Mathematica notebooks are, of course, plaintext files -- it seems reasonable to expect that
It seems that even when using shivs you can't do something like input[type=search] to
It seems that with an object like this: #<Course id: 1, name: Targeting Triple
It seems that ASP.NET MVC just runs on top of ASP.NET WebForms. System.Web.Mvc.ViewPage in
I'm taking a course that is requiring the use of Checkstyle. I'm quite confused
This seems like a really basic thing that I'm doing, yet I'm tearing my
This XML documentation seems to say that the ID derived type supports a pattern,
I have a flyout menu that (of course) looks great in FF/Chrome, but in
I want to do something like speaker verification on iPhone (as a course project).
It seems, from what I read, that we will not have a JSSH for

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.