I've run into a small usability issue, and I can't get my head around the solution.
Imagine 1 [above] as being a set of large divs, say the width of a typical web page e.g. 900px.
A user can click on a div to expand it, for example in [2] the first div has been clicked.
In [3] the second div has been clicked, opening it and also closing the first one.
The trouble is that the top of this newly opened div 'moves up' from it's position at [2]. This is normal and expected behaviour of course, but in my specific application with lots of similar, large divs it is confusing for the user; the point of focus for the user is no longer where it was.
Ideally, what I want is behaviour like [4], where the clicked element will remain in the same place relative to the browser window.
Obviously this requires that the page has been scrolled down a bit to allow the page to 'move down' to compensate. This should usually be the case as the user will have scrolled down a bit to see these divs.
Hopefully this makes sense...
J