Reduce Spacing Between Web Parts in SharePoint 2016
Question details
The user wants to reduce whitespace, margins, or borders between Web Parts on a SharePoint 2016 page.

- Product
- SharePoint Server 2016
- Device & OS
- not provided
- Scenario
- Customizing the layout of Web Parts on a classic SharePoint page.
- Observed behavior
- Extra spacing appears between Web Parts, and CSS customization options are more limited in the modern experience.
Confirm that the page uses the classic experience and that you have permission to edit it. Ask your SharePoint administrator which stylesheet customization method is approved for the site.
Adjust Web Part Spacing with CSS on a Classic Page
Use this approach when you can apply an approved stylesheet to a SharePoint 2016 classic page.
Open the classic page in your browser, right-click the space or Web Part container, and select Inspect. Check the relevant elements for margin, padding, and border values.
In the browser's developer tools, identify a selector that targets the affected Web Part or its container without changing unrelated parts of the site. Test smaller margin or padding values in the Styles panel.
Add the tested CSS rules to the site's approved custom stylesheet using your administrator's supported deployment method. Set only the properties that create the unwanted space, such as margin-bottom, padding, or border.
Refresh the classic page and review the affected Web Parts. Check other pages that use the same stylesheet to confirm the rules do not change their layouts unexpectedly.

Check for the Content Editor Web Part on a Classic Page
Use this option to see whether the Content Editor Web Part is available for an administrator-approved page customization.
Work with Office Documents Alongside SharePoint
WPS Office is a free, lightweight alternative for editing documents, spreadsheets, and presentations with a familiar interface. Its Office format compatibility can help you move existing files into your workflow. It does not change SharePoint Web Part spacing.

Frequently Asked Questions
Which CSS properties control the space between Web Parts?
Margins and padding on a Web Part or its surrounding container commonly create the space; borders can also affect its appearance. Right-click the area and select Inspect to see which properties apply.
Is the Content Editor Web Part available on modern pages?
No. On a classic page, use Edit page and Add a Web Part, then look under Media and Content for Content Editor. Its availability can depend on site settings and permissions.
Can I switch a modern page to a classic page?
A modern page does not necessarily have a direct conversion switch. Ask your SharePoint administrator whether you can use or create an appropriate classic page for the customization.
Why did my CSS change other pages too?
A shared stylesheet or broad selector can affect multiple pages. Inspect the affected elements and scope the selector more narrowly, then update the approved stylesheet and check the pages again.




