I have Full control over a site, and I want to set background images to different pages, I looked for some guides on the internet, they suggest using Content Editor WebPart to add the background using CSS. The problem is I'm using Sharepoint Online and I can't find the Content Editor b Part.


4 Answers 4


Make sure that the these features are activated in your site -

  1. SharePoint Server Publishing Infrastructure (in Site Collection level)
  2. SharePoint Server Publishing (in Site level)

This should provide you with content editor webpart in your site, which can then be located via -

Settings >> Add Webpart >> Media and Content >> Content Editor


Not sure about Content Editor Web Part, but Script Editor webpart would be disabled until You change these settings:

enter image description here

It is in "Tenant Admin Settings" -> "Settings" It takes 24 hours to apply and then You will see 'Script Editor' webpart and some new items in "Site Settings" ('Themes', etc.)


While a Content Editor Web Part would work, it is a very tedious approach depending on the size of site you are working with. A CEWP would have to be added to every page and sub page in the area or section of the site where you want the image. If you wanted to update it in the future it would have to be modified on a page by page basis.

You can execute page by page or section by section background images using a central CSS file and attribute selectors in your CSS. For example:

form[action*="/products/"] #s4-workspace {
  background: url("https://images.pexels.com/photos/56866/garden-rose-red-pink-56866.jpeg");
  background-size: cover;

This code looks for /products/ in the URL and provides the image accordingly. You can create a style statement per background image needed. This approach would work for header images, colors, anything you need to be different.

If you are want changes to apply to an entire sub site, a better approach is to set the Alt CSS URL setting per sub site. That is one of the better ways to implement design variations in SharePoint.


But to address the original issue of a background image...Change the look has that option.


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.