Hi
How to resize GlobalDoc viewer based on the browser maximize/restore down?
When I start to view a file in GlobalDoc viewer, I first decrease the browser width and height using the browser “Restore Down” button. After the file opens in the viewer I click the maximize button, but the GlobalDoc viewer does not fill the full screen.
In the demo project a static width and height are used:
style='width: 1000px; height: 580px; overflow: auto; position: relative; margin-bottom: 20px; background-color: gray; top: -1px; left: 0px;'
So when the browser is restored down or maximized the viewer always fits that static size. I need to make the width and height dynamic.
Screenshots
- http://prntscr.com/3yjdfv — 1366 × 768
- http://prntscr.com/3yjcux — 1900 × 1600
In the first resolution the viewer looks full‑page; in the second it does not fit because of the fixed size. I need CSS that makes the viewer adjust to the browser window when it is restored down or maximized.
What I tried
CSS
.styCenter {
height: 100%;
width: 100%;
}
JavaScript (jQuery)
$(document).ready(function () {
$(".styCenter").css({ "height": "100%" });
$(".styCenter").css({ "width": "100%" });
});
HTML
<div id="test" class="styCenter" style="position:absolute; left:1px; top:1px; width:100%; height:100%"></div>
The above does not work.
Please reply ASAP.
Regards,
Aravind