I need help figuring out why a web page is jumping down in IE when the browser windows width is shortened. My clients have very small monitors and the webpage jumps down about an inch .
Please HELP!!

Dani AI

Generated

Short diagnostic checklist and practical fixes that address the behavior described by and the troubleshooting hints from and .

Start by isolating the trigger: reproduce the jump in IE while watching which element changes position. Disable scripts and external embeds (ads/Flash) temporarily, and try the page without CSS to see whether layout or script is responsible. Use the browser’s element inspector (or IE Developer Toolbar / F12 tools) while resizing to see which node's height/position changes. Search scripts for focus() or scrollIntoView() and any DOM writes that run on resize or load.

Common, reliable fixes (apply after identifying the culprit):

  • Force a stable scrollbar to avoid layout reflow:

    html, body {
      height: 100%;
      overflow-y: scroll; /* keeps the vertical scrollbar present so width doesn't jump */
    }
  • Prevent late-loaded images/embeds from changing layout: include explicit width and height attributes on img/embed or set container dimensions so new content can't push other elements.

    img { max-width: 100%; height: auto; display: block; }
    .media-slot { width: 600px; height: 200px; overflow: hidden; position: relative; }
  • Stop automatic focus/scroll jitter: remove or delay focus calls, or capture/restore scroll position around focus operations:

    var oldY = document.documentElement.scrollTop || document.body.scrollTop;
    myInput.focus();
    window.scrollTo(0, oldY);
  • Fix old IE layout quirks: adding zoom: 1; to a container can stabilize reflow in IE6/7 (triggers hasLayout).

Prioritize diagnosing the cause before applying workarounds. Forcing a permanent scrollbar hides the symptom but does not fix the underlying issue; the best outcome is sizing dynamic content or removing unexpected autoscrolls so the layout remains stable on small monitors and in IE.

Recommended Answers

All 2 Replies

We really need to see a working page so we can identify the problem.

My guess is that there is some object that is getting moved to a different position and is bumping everything else down.

Several possibilities:

1. The vertical scroll bar appeared when enough of the paged loaded to make it longer than the screen, and it knocked objects around or shortened line lengths (causing text to wrap).

2. An image finished loading, and it is larger or smaller than the initial space the browser left on the screen for it.

3. You have code with the text fill-in cursor jumping to a place which is not on the screen. The screen scrolls so the cursor appears.

4. There is an ad on the page, and it is "selfish", scrolling the page to be visible.

5. A flash, script, or other slideshow has images of different sizes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.