1
form[action*="/products/"] #s4-workspace {
  background: url("https://images.pexels.com/photos/56866/garden-rose-red-pink-56866.jpeg");
  background-size: cover;
}
2
  • Are you using modern sites or classic sites? Commented Jun 19, 2019 at 22:47
  • classic version? Commented Jun 19, 2019 at 22:59

2 Answers 2

1

For classic SharePoint, you can open SharePoint Designer or any other text editor tool to edit the master page or page layout.

Use Master Page if you want this background image to appear on all the pages. If you want to show background image for specific page layout, I'll suggest editing that layout. For this you need to turn on SharePoint Publishing Infrastructure feature at Site as well as Web level.

Once its activated navigate to http://site-coll-url/_catalogs/masterpage url. You can see all the HTML and ASPX version of master pages/page layout here. Do not make any edit to ASPX page. Just create a copy of current active master page/page layout using the .html file. It will auto generate corresponding .aspx file for you.

Now open the HTML file, using desired text editor, and add the CSS mentioned above in style block, before </body> tag. Just remove form[action*="/products/"] completely from your script, and it is good to go.

See the images below:

1. Master Page to edit

enter image description here

2. Add CSS

enter image description here

3. Finally publish the page

1
  • I open the master page Gallery, but I am not able to find the HTML file. however, I could not turn on the SharePoint Publishing Infrastructure feature, it is coming up as a technical error. Commented Jun 19, 2019 at 23:57
1

Open the seattle.master or oslo.master file using SharePoint designer 2013, then edit the file in Advanced Mode, then add the style below into < head /> tag.

<style type="text/css">
#s4-workspace {
  background: url("https://images.pexels.com/photos/56866/garden-rose-red-pink-56866.jpeg");
  background-size: cover;
}
</style>

enter image description here

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.