SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Found out how to change the background of one single page (body of that page). This works when I want a single page or two to have a specific background instead of modifying a master page.

Is there something similar to change the background color of a webpart? or add an image as the background? or even make it transparent?

Thanks as always!

share|improve this question
I have been looking for this for a long time. thanks. Is there any way to replace the background color with an image? thanks again, TDR. – user24092 Mar 3 '14 at 8:19
up vote 4 down vote accepted

Basically, it can be done with css with header and table changing:

.s4-wpTopTable {

.ms-WPHeader {

If you want to apply this to particular web-part, you can add additional css-marker class on you web-part render methods to find you web part instance later or use js/jQuery-client bases techniques to apply/change css on target webpart.

enter image description here

share|improve this answer
awesome...thanks! – Justin Jun 26 '12 at 18:23

The WebPart class has properties for background color and background image URL.

share|improve this answer
@rob...thanks for the reference. btw I have learned quite a lot from your videos out there! great help...thanks! – Justin Jun 26 '12 at 18:22
Thanks - glad to help! – Rob Windsor Jun 26 '12 at 19:37

You can change the background by simply assigning relevant CSS to the topmost table or div tag that your webpart generates.For data-view, the html markup is in its XSL.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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