I have a SharePoint modern page that I would like to customize with javascript or CSS, is this not possible?

I want to remove the top bars and the bottom as well, so that I pretty much have a blank page.

1 Answer 1


It is not possible without using the SharePoint Framework, and even then its not recommended/supported. It's not recommended because the pace of change of Office 365 means that any DOM manipulation of OOB code is likely to be broken at any time by updates from Microsoft.

That said, there are 3 ways off the top of my head that you can do this, if you choose to proceed at your own risk:

  1. Use SharePoint Framework extensions to create a header or footer that brings in custom JS, at which point you can do what you want.
  2. Use Script editor web part for modern pages built in React to bring in your own custom JS.
  3. Use A SharePoint Framework Content Editor Web Part to bring in your own custom JS.

The last two work for customizing a single page. The first will do all modern pages. These techniques may be limited depending on whether the site is marked no script. And all of them require that you have sufficient privileges to deploy Spfx solutions.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.