How to add custom CSS file to SharePoint online page

kem104 170 Reputation points
2024-03-01T22:43:36.91+00:00

I have created Custom.master page from the SharePoint Designer 2013, which is a copy of the Seattle.master page. then I attached customcss.css file from the Site Library Folder. I saved the master page file and set as default master page in SP Designer. Also in Sharepoint online I have selected my custom.master page in Site Manger Page Setting. However the custom master page updates does not reflect to sharepoint site. In the viewsource of the page customcss.css link is not found. my aim is the add the customcss.css file to the sharepoint site so I can customize the fonts and the page look and feel. I tried with Alternate CSS Url to apply my customcss.css file however it reflects to Sharepoint Setting text not on the actual site home page.

Can any one please help. really appreciated.

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

Accepted answer
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2024-03-04T02:55:26.8033333+00:00

    Hi @kem104,

    Please check if you are using modern page or classic page. The master page only support classic page. But it is now more recommended to use modern page and custom the page by spfx extension. Please refer to the following steps to create custom style.

    https://www.sharepointdiary.com/2020/09/sharepoint-online-inject-custom-css-to-modern-sites.html

    Here is a similar issue with yours

    https://stackoverflow.com/questions/47995810/cant-change-styling-in-sharepoint-online


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.