How to Remove or Hide Scrollbars from Embedded Visio Web Parts in SharePoint
Question details
The user needs to remove or hide scrollbars that persist on an embedded Visio diagram within a SharePoint web part.

- Product
- SharePoint / Microsoft Visio
- Device & OS
- not provided
- Scenario
- Embedding a Visio diagram via iframe into a SharePoint site page.
- Observed behavior
- Scrollbars remain visible on the embedded diagram even when the iframe includes scrolling disabled attributes or CSS overflow hidden rules.
Ensure you have edit permissions for the SharePoint page and access to the original Visio file to modify its page dimensions if necessary.
Adjust Iframe Dimensions and Visio Zoom Settings
Modify the iframe dimensions and the Visio diagram's zoom settings so the content fits perfectly within the container without triggering scrollbars.
Often, scrollbars appear because the embedded content is slightly larger than the container. Adjusting the iframe parameters can provide enough room for the diagram.
Navigate to your SharePoint site and click 'Edit' at the top right corner of the page to open the page editor.
Locate the Embed Web Part containing your Visio diagram. Click the pencil icon to edit the web part properties.
In the embed code snippet, increase the 'width' and 'height' attributes of the iframe tag to accommodate the full size of the diagram.
If the embed URL includes a zoom parameter (e.g., wdZoom), lower the value so the diagram scales down to fit the new iframe dimensions.

Apply an Overflow-Hidden CSS Wrapper
Wrap the iframe in a custom HTML div element with CSS properties designed to hide overflow content generated by SharePoint's responsive container.
Looking for a Lightweight Office Suite?
While SharePoint and Visio integration requires specific Microsoft environment configurations, if you are looking for a comprehensive, lightweight, and free alternative to Microsoft Office for your daily document and flowchart needs, WPS Office is an excellent choice. It offers powerful tools with zero complex cross-origin iframe issues.
- 1. Download WPS Office: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install the Software: Run the installer and follow the on-screen instructions to set up WPS Office on your computer.
- 3. Create Diagrams and Documents: Open WPS Office and navigate to the built-in flowchart tools or open your existing Microsoft Office files with perfect compatibility.

Frequently Asked Questions
Why does the 'scrolling=no' attribute not work in my SharePoint iframe?
Modern web browsers and cross-origin security policies often override the deprecated 'scrolling=no' HTML attribute. This means the embedded content (such as a Visio diagram hosted on a different server or application) determines its own overflow behavior, rendering the iframe attribute ineffective.
Can I resize the Visio diagram itself to prevent scrollbars?
Yes. Opening the original file in Visio desktop or Visio for the Web and adjusting the page size to perfectly fit the drawing (using the 'Fit to Drawing' feature) can eliminate extra whitespace that triggers scrollbars when embedded.
Where can I get help for custom SharePoint development code?
If built-in iframe adjustments and CSS wrappers do not solve your issue, it is recommended to post in the Microsoft Q&A for SharePoint Online. Development experts there can provide guidance on custom SharePoint Framework (SPFx) solutions.




