How can we help you today?

How to Round the Corners of SharePoint Web Parts

By default, SharePoint web parts have square corners:


default web part corners


This article will demonstrate how to round its edges using the FREE ShortPoint Code Editor Web Part. You can follow the quick walkthrough or go through the detailed steps in the Step-by-step Tutorial to get started.


rounded web part corner


Quick Walkthrough

1. Inspect a SharePoint web part and copy the data-sp-feature-tag value.

2. Copy the code below and replace the data-sp-feature-tag value with the one you copied in Step 1:

[data-sp-feature-tag="WebPartName"] {
border-radius: 20px;
overflow: hidden;
}

3. Go to your SharePoint page and add the ShortPoint Code Web Part.

4. Click the Edit Properties icon of the ShortPoint Code to edit it.

5. Delete all default codes

6. Paste the copied code in the Edit CSS field, customize the border-radius value, and click Save.

7. Disable the Contain CSS Style option.

8. Close the ShortPoint Code window.

9. Republish the page.


TABLE OF CONTENTS


Prerequisites


Step-by-step Tutorial

Follow the steps below to learn how to round the edges of SharePoint Web Parts. We will be using a CSS Code to accomplish this.


Step 1: Copy the Data SP Feature Tag

  • Go to the SharePoint page you want to use and look for the SharePoint Web Part you want to round the edges. For this guide, we will use the Editor Card Web Part:


Editor Card Web Part

  • Right-click the SharePoint Web Part and click Inspect:

inspect web part


  • Find the data-sp-feature-tag and copy the value inside the quotation marks:

data-sp-feature-tag


NOTETake note of the data-sp-feature-tag value. You will need this in Step 2.

Step 2: Copy the Code

  • Copy the Custom CSS code below:
[data-sp-feature-tag="WebPartName"] { 
border-radius: 20px;
overflow: hidden;
}


  • Replace the value inside the data-sp-feature-tag with the one you got from Step 1. You can use the code below as a reference:


[data-sp-feature-tag="EditorialCardWebPart web part (Editorial card)"] { 
border-radius: 20px;
overflow: hidden;

Step 3: Add the ShortPoint Code Web Part


  • Go to the SharePoint page where you have the SharePoint Web Part and click Edit:

Edit


  • Click the close icon to leave the Toolbox:


close icon

  • Select the plus icon near the SharePoint Web Part:


plus icon

  • Use the search bar to look for ShortPoint Code, or scroll down until you see the Advanced section. Click ShortPoint Code:

ShortPoint Code


Step 4: Edit the ShortPoint Code Web Part

  • Click the Edit Properties icon:

Edit properties icon


Step 5: Delete Default Codes

  • Select each field, delete the default codes, and click Save:

delete default codes


Step 6: Paste the Code

  • Select the Edit CSS field:

Edit CSS field


  • Paste the Code:

paste code


  • Customize the border-radius value according to your preferences and click Save:


Save


Step 7: Disable Contain CSS Style

  • Scroll down and disable Contain CSS Style to ensure that the code works properly:

disable contain css style


Step 8: Republish Page

close icon


  • Click Republish once you’re ready to make your changes live:

Republish


Well done! You now have rounded SharePoint Web Part corners. Enjoy trying this Custom CSS on your SharePoint pages. If you need more ways to style your SharePoint pages, check out the tutorials below:

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

World's best intranet sites are designed using ShortPoint

Get started today! Learn more
See all 24 topics

Start a trial

Ignite your vision. Install ShortPoint directly on your site, or play in sandbox mode. No credit card required.

Get started today

World’s best intranet sites are designed using ShortPoint

Thousands of companies using ShortPoint everyday to design, brand and build award winning intranet sites.

Get started Learn more