1

A Page Viewer web part was added to a page. The Page Viewer points to a SharePoint library folder. The folder and its contents are viewed in the IFRAME, but the box has a vertical scroll. I've tried everything to hide, including adding a "overflow:hidden;" css mod, didn't work. Ideas? edit: meant to say "hide the vertical scroll"

1 Answer 1

0

The scrollbar comes from within the iframe and is therefore inaccessible by CSS on the hosting page. You can, however, add some JavaScript to the page that is shown in the iframe, that checks the value of a custom parameter in the querystring and adds your overflow:hidden accordingly.

JSRequest.EnsureSetup(); 
if(JSRequest.QueryString["scrollbars"] == "false"){
    ... remove scrollbars
}

In your iframe configuration you pass the scrollbars parameter with value false to the page.

For example:

https://.../AllItems.aspx?scrollbars=false

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.