If you intend to have a fixed height on a Web Part so that it won't expand over the limited space where you want it to be visible, you can add a scroll to the Web Part. Following the steps below will allow you to add a scroll to any Web Part, on a specific page.
This procedure is only available for Classic SharePoint sites and/or pages.
- Open the page where you have your Web Part.
- Right click the Web Part and click Inspect.
- The browser's developer tools should open with one of the Web Part's elements selected.
- Navigate up the HTML elements until you find the one with WebpartID.
- Find the ID attribute in the element and copy the value
- Now Edit the page and place a Script Editor web part at the bottom
- Once it's added, Edit the web part properties
- Now click the Edit Snippet for the script editor to pop up
- Paste the following code inside the text area. Replace [WEBPARTID] with the value copied in step 5:
<style> #[WEBPARTID] .bt-webpart-zone { max-height: 300px; /* adjust this value as you see fit*/ overflow: auto; } </style>
- Click the Insert button.
- Click OK on the web part properties
- Save the page
- That's it. The Web Part should now have the scroll applied to it
Comments