views:

80

answers:

0

I'm working on a web app in ASP (although as far as I can tell this is purely a rendering issue).

We have a page, where the body has a min-width set, but the content is pretty close to the width anyway.

The page contains a "popup", which is an absolutely-positioned div. The div has top, left and right offsets of 100px. It also has a minimum width, a fair bit smaller than the body with.

The issue arises when the browser is sized so the viewport is less than the width of the body, but wide enough to show the popup with 100px clear on each side.

What should be showing is:

  • the popup fills the width of the screen except for 100px on each side
  • you can scroll right, in which case the popup scrolls out of sight

In most cases, this is what happens. This appears to be according to spec: because none of the popup's containers have non-default position set, the absolute positioning is set by the viewport.

However, in one case, you get the following:

  • the popup fills the width of the screen except for 100px on the left
  • you can scroll right, and when you get to the far right, there is a 100px gap to the right of the popup

i.e. The popup has sized to the body, not the viewport. In addition, as soon as you resize the window (or click on a button on the popup, which causes the button to change size, don't get me started on that), the popup jumps back to the correct size.

Here's the kicker. The one case where that happens? When you're viewing the site, in Compatibility View, remotely, when it's deployed on our 64-bit machine. Viewed locally on the 64-bit machine, it's fine. Viewed in IE8 without Compatibility View, it's fine. Viewed when it's deployed on a 32-bit machine or our own dev machines, it's fine.

In any case, the actual html/css/etc. given to the browser is mostly the same, save for ASP stuff like viewstate, timestamps etc.

So, to give a couple of actual questions:

  • Can anyone give any input on why (in that one case) the popup div is initially sized to the body rather than the viewport?
  • Can anyone fathom why it matters which machine the site is deployed on, and where it's viewed from, even though the markup given to the browser is mostly the same?

I can't post the actual code I'm working on, and I've not had any luck replicating it with minimal code from scratch. I know I'm not giving you much to go on. I'm just hoping this rings a bell with someone.