Background color in webpart

Bergur Hansen 31 Reputation points
2021-06-09T13:08:29.857+00:00

Is it possible to set a bacground color in a web part in sharepoint online?, I can see that there is no out of the box solution.

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. Allen Xu_MSFT 13,861 Reputation points
    2021-06-10T06:06:22.593+00:00

    Hi @Bergur Hansen ,

    Yes, there is no OOB solution to set background color of a web part, but we can achieve it by injecting CSS code to SharePoint modern page. There are two options for you to achieve this:

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.