Enable scrolling within floatbox for large image

Page: 1

Author Post
Member
Registered: Feb 2015
Posts: 4
I have a large image, i.e. a website screenshot one screen wide and multiple screens high. What I would like to achieve is this:

Load the image within a floatbox, which is as wide as the image itself, but much less high. So the image would be cut off, with only the top showing in the floatbox. Then I would like to be able to vertically scroll the image itself within the floatbox.

This, of course, is possible for HTML content, but, to my understanding, not for images. Or is there a way to achieve it for images, too? If not, it would be a good addition.
Administrator
Registered: Aug 2008
Posts: 3382
The simplest answer is hinted at in the question. Build a standalone page that contains nothing but the image (no padding, margins or borders anywhere) and load that scrollable page as iframe content into a floatbox. Being a large image, you may want to use fb.preload from script on the main page to get the image into cache and avoid a slow floatbox load.
Member
Registered: Feb 2015
Posts: 4
Thank you for the feedback!

Indeed, I was also thinking of this approach, but wanted to make sure there is no direct way to achieve with only the image. I implemented it now as suggested. Works great and it perfectly serves my purpose...

Page: 1