How to customize a Sharepoint theme

31. March 2009 16:29 by sashashev in reskining  //  Tags: , ,   //   Comments (0)
In this article, we are going to explore how to modify an existing Sharepoint theme.  This process is pretty straight forward and this article provides a few tips and tricks along the way.  Please note this process requires some previous CSS experience.

Copy the theme directory you want to customize


1.    Navigate to THEMES folder:  %Program Files%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES.  Copy theme folder you want to modify and rename the copied folder.  Here, we copied the BREEZE2 folder and renamed it to DERWENT.


Update the copied files with the new theme information

2.     Navigate into the new theme folder and rename the .INF to the name of the new theme.  Here we renamed BREEZE2.INF to DERWENT.INF.


 3.     Open the INF that was just renamed and update all the entries with the new name of your theme.  A global search and replace (Ctrl+H in most editors) will take care of this easily for you.  Here we changed all the Breeze2 entries to Derwent.


 4.    Next, we need to add the new theme into the XML file so that Sharepoint knows it exists.  To do this, we are going to edit the SPTHEMES.XML file located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033.   Add the following <Templates> entry into the XML file:

For now, leave the <Thumbnail> and <Preview> tags as they are, we will get to these later.  They simply specify which images will show up when the user is previewing a theme.  Since we don’t have a screenshot of our new theme yet, we do not have anything to put here.  Your XML file should look similar to the one below:

Make CSS changes to the theme

5.    Next, we are going to edit the theme.css style sheet located in the new theme folder (for example, C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES\DERWENT\theme.css).

This is where all of the hard work comes in.  In order to work more efficiently, it is a good idea to save a couple of the Sharepoint pages locally (File -> Save As… from IE, select Webpage, complete (*.htm;*.html) for Save as type).  


This will allow you see the CSS changes on a local page without have to perform an iisreset (See Step 6) on the server.

For the pages I saved locally, the .htm files seemed to link to “Derw1011-65001.css” style sheet instead of the expected theme.css file.  It turns out the “Derw1011-65001.css” is actually a copy of the theme.css style sheet.  (The “65001” in the filename comes from the codepage setting in the .INF file).  So when you save a page locally, it will also save the “Derw1011-65001.css” file since the .htm file links to this file.  Edit the “Derw1011-65001.css” file locally and once you’re happy with the changes, copy the contents of this CSS file into the theme.css file located on the server (after making a backup, of course).

Microsoft has provided some documentation ( on the CSS classes used in core.css which shares some common CSS classes with theme.css, however I found it easier to examine the CSS information using IE Web Developer or Firebug.

Force Sharepoint to recognize changes

6.    Now that you finished with your CSS changes, you need to perform an iisreset from the command prompt in order for the Sharepoint server to recognize the changes.   

To do this, start the command prompt (Start -> Run… -> type cmd -> Enter).

   Type iisreset, then hit enter. 

Note: be careful performing this command on a server in a production environment as it will sever any active connections to all of the websites being hosted on the server.

Apply customized theme to site

7.    Next, we are going to apply the newly created theme.  Open a browser and navigate to the Sharepoint page that you want to apply the new theme to.  Click Site Actions -> Site Settings.

 Once in Site Settings, click “Site Theme” from the Look and Feel section:

This will bring up a list of all available themes that you can apply to the site.  You should see the theme we added in the previous steps.  Below, you can see the Derwent theme we added in the example:

Highlight the theme you added, and click apply. 

Update preview image

8.    Notice the Preview image shown to the left of the list of themes.  You will still see the preview image of the copied theme.

In order to update that image with a preview of our own theme, we need to grab a screenshot of our new theme and add it to the proper location.

Navigate to the home page of the site you changed the theme for.  In our example, we would navigate to the My Home page.

Take a screenshot of this page and resize it to about 350 x 230 pixels using your favorite image editor (i.e. SnagIt). 

Save the screenshot in a standard format (.gif, .jpg, or .png).

9.    Next, we need to add the image to the Sharepoint server so that the image will appear when a user is attempting to select a theme.

Copy the screenshot image you created in Step 8 into %Program Files%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES.  Here you can see I’ve named my screenshot Derwent_Preview.gif:

 10.     Repeat Step 4, updating the <Preview> and <Thumbnail> attributes in the SPTHEMES.XML file with the new name of your preview image, as shown below:

11.     Repeat Step 6 to complete the changes on the Sharepoint server.

12.    Next, we need to see our changes on the Sharepoint site.  Repeat Step 7 to navigate to the Site Themes Settings Page.

Notice that the image you just created isn’t showing up in the preview?  In order to see the changes you just made to the theme, you must first apply another theme (any theme listed - it doesn’t matter which one), and then reapply the new theme. This is required to see ANY changes you have made to theme, if you already have the theme applied.

Add comment

  Country flag

  • Comment
  • Preview

Webcoda, SharePoint Consultants & Web Development

SharePoint Development Sydney is a crack team of SharePoint Consultants and SharePoint Developers.

We can't tell you their names or show their faces on TV but if you need a SharePoint job done right, call them on +61 2 9370 3602 or email us at

Persecuted by the Government and shunned by society they developed their SharePoint skills in back streets and labor camps where other programmers wouldn't dare to tread. 

During a trek through the Himalayas they stumpled upon the fabled Mossy Yak who shared his SharePoint knowledge of how to attain Nirvana through a series of Workflows and Event Handlers. Their mission is to spread this knowledge through-out the world to bring peace, harmony and document version control to all .


Month List