Css file doesn't affect after editing in SharePoint Online

I has a css file named styles.css and it was loaded in masterPage of sharepoint .I change this css file but not working. I make sure this css file already loaded in html page.I also clear cache but I don't know why it doesn't affect when I edit. Please help me, thank you so much!

enter image description here

Upvotes: 0

Views: 523

Answers (1)

Amos
Amos

Reputation: 2091

It is not recommended to modify the online master page directly. Firstly, you need to check if the CSS file is really imported.

enter image description here

Secondly,if the file is not imported, classic page you could upload CSS here.enter image description here

modern page we should upload CSS with SPFX,here is a tutorial: https://github.com/hugoabernier/react-application-injectcss. If the file is imported, first check whether the content of the file is displayed normally (excluding problems caused by encoding), then you can add ‘! Important’ after the style. enter image description here enter image description here

Upvotes: 1

Related Questions