How to: Customize Themes

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

You can add new themes or customize existing ones for application to Web sites in Microsoft Windows SharePoint Services 3.0. This programming task shows how to customize an existing theme.

To customize an existing theme

  1. Copy one of the theme folders in Local_Drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES and give the folder a unique name. In this example, the name is MyTheme. This folder contains cascading style sheets (CSS) files, image files, and other files that define the styles, formatting, and color for the various user interface (UI) elements that are used in the theme.

  2. Find the .inf file in the copied folder, and rename it with the name given to the folder.

  3. Open the .inf file and assign the same name to the title in the [info] and [titles] sections of the file.

  4. Customize the styles defined in the .css files of the copied folder as needed.

    For information about the classes used in Windows SharePoint Services, see Cascading Style Sheets Class Definitions for Windows SharePoint Services.

    The following example from THEME.CSS changes the color that is used for sections of the navigation area.

    border-bottom:1px solid #8D4D03;
    .ms-nav .ms-navwatermark{
  5. Modify the image files in the copied folder by using the business graphics software of your choice.

  6. Add a file for thumbnail and preview images for your custom theme to the Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\IMAGES directory. In this example, the file is called myPreview.gif.

  7. Add a theme template definition to SPTHEMES.XML, which is the file that determines which themes are available as options on the Site Theme page. This XML file is located in the Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033 directory.

    The following example specifies a template for the custom theme.

       <DisplayName>My Theme</DisplayName>
  8. Reset Internet Information Services (IIS) by typing iisreset at the command prompt so that your custom theme appears in the list of options on the Site Theme page and can be applied to SharePoint sites.

Robust Programming

Warning   Changes that you make to SPTHEMES.XML might be overwritten when you install updates or service packs for Windows SharePoint Services, or when you upgrade an installation to the next version.