1 (edited by remoteneeded 2013-01-02 21:47:07)

Topic: Scrolling problem with 2.3.1

I'm having problems getting a vertical scrollbar to work properly. I initially looked in the FAQ under: "How do I add a vertical scrollbar to my gallery ?", but unfortunately that link doesn't work. Next I looked in the support forum and saw that I should add the following into the HEAD section:

<style type="text/css">
    body, html {
        overflow: auto;

That produced some strange results. In Chrome I get two vertical scroll bars. In IE9 I also get double scrollbars when running locally, but no scrollbars when running from an Apache server. On an iPad I get no scrollbars.

Test page here:

Any help would be brilliant. Many thanks.

Re: Scrolling problem with 2.3.1

The FAQ you refer to is a hangover from the SimpleViewer v1.9 FAQ where it was necessary to remove a line from the gallery's 'index.html' file to allow a vertical scrollbar to be displayed. I have now removed it. Thank you for reporting.
With SimpleViewer v2, it should not be necessary to do anything and a vertical scrollbar should be displayed if necessary.

The problem you experience is due to your web page having header content (which takes up a finite height) and then your gallery having a height defined as '100%'. (The browsers do not know what this is 100% of. If there was no other content on your page, the gallery would take up 100% of the browser window height but there is other content on your page.)
Try giving your gallery an absolute pixel value for a height, e.g.:

simpleviewer.load('sv-container', '100%', '800', '181818', true);

... or keep your gallery's height as '100%' but place your gallery in a parent container whose height has been specified as an absolute pixel value, e.g.

<div id="parent" style="height: 800px;">
    <div id="sv-container" ></div>

Both of the above should produce only a single vertical scroll bar (if neccesary).

Alternatively, if you wish to display your header content and the gallery in the remainder of the web page with no vertical scroll bar, please see the Using a Resizable Gallery with a Header support section.

Steven Speirs
SimpleViewer Support Team

Re: Scrolling problem with 2.3.1

Thanks Steven, that's a great help. I'll probably go with your final suggestion of how to use a resizable gallery with a header as that produces a very neat result.

Thanks again.