blasten / turn.js

The page flip effect for HTML5
www.turnjs.com
Other
7.21k stars 2.47k forks source link

Static flipbook and browser scrollbar issues #288

Open nickj10000 opened 11 years ago

nickj10000 commented 11 years ago

Hi having purchased a license, I think turn.js is excellent, however I have hit a snag I can't seem to get around. In the magazine example the flipbook is positioned centrally and is dynamically re-sized to match the browser window size, with browser scrollbars disabled. However I need to allow the use of browser scrollbars, and have the flipbook placed in a fixed position in relation to other content (custom navigation menu).

If a browser window is partially sized (or fully sized at a lower screen resolution) and the CSS is modified from the below to use fixed position for the top and left (with the re-size viewport call left out) - any part of the flipbook out of sight will adopt the current browser window's bounds. So when you scroll down with the browser scrollbars it will leave only the portion of the flipbook taking up the initial browser window's size visible e.g. chops off the bottom of the flipbook or the sides when you scroll outside the initial load area.

.magazine-viewport .container{ position:absolute; top:50%; left:50%; }

I'd like the flipbook to be able to load in a static position with a fixed size and if a user's browser is not maximised - allow the user to still be able to see flipbook content outside of the bounds of the initial window.

Any help much appreciated.

Thanks in advance.

louy commented 11 years ago

Did you try adding it to a container with overflow:hidden;?