Add custom background them for a SharePoint site header

SR VSP 1,251 Reputation points
2021-05-20T14:52:23.257+00:00

Hi Guys,

Is there any way to add a custom background theme in SharePoint Online site. I've an graphical image which needs to be set as a background.

Please advise and i'm not a SharePoint developer.

98207-site-custom-background-image.jpg

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

Accepted answer
  1. Echo Du_MSFT 17,316 Reputation points
    2021-05-21T02:35:15.393+00:00

    Hello @SR VSP ,

    There is no out-of-the-box way to implement your design. However, you need use SPFX to custom page background theme.

    1.Install react-application-injectcss SPFX to inject a custom Cascading Style Sheet (CSS) on modern pages.

    2.Click on F12 to open DevTools, find the corresponding Class Selector

    98388-1.png

    3.Use the below css code:

    .mainHeader-47{  
     background:#F5DA81;  
    }  
    

    98408-2.png

    Thanks,
    Echo Du

    ===============================

    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.