# Tutorial: Creating a Custom Skin

## Creating a Custom Skin for RadToolTip for ASP.NET AJAX from an Existing One

In order to explain better the CSS classes of RadToolTip, we will use ToolTip.SkinName.css as external resources. We will modify an existing skin of RadToolTip. Follow these steps to register an external skin for RadToolTip for ASP.NET AJAX before editing any CSS:

1. In your project, create a new directory named Skins

2. In the Skins folder create a new directory **MyCustomSkin**.

3. Go to **\~/\[TelerikControlsInstallationFolder]/Skins/Default** and copy **Tooltip.Default.css** and the **Skins/Default/Tooltip** folder in your Skins folder.

4. Rename **Tooltip.Default.css** to **Tooltip.MyCustomSkin.css** and the folder **Default** to **MyCustomSkin**.

5. When you are finished you should have **Skins/MyCustomSkin/Tooltip.MyCustomSkin.css** and **Skins/MyCustomSkin/Tooltip**. The last folder contains the images for **MyCustomSkin**.

6. In order to support multiple skins of RadTooltip on a single page, the wrapping skin-specific class is coined by the name of the control, RadTooltip plus underscore ("`_`") plus SkinName, i.e. **.RadTooltip_Default**, so in order to create a custom skin out of the Default skin, we should rename all occurrences of "**Default**" in **Tooltip.MyCustomSkin.css** to "**MyCustomSkin**" as shown below:

   ![Tooltip skin name](https://www.telerik.com/products/aspnet-ajax/documentation/assets/2d30cddc63eeddcb0cfa95d09dac21b4/tooltip-cssclassesbatchrename.gif)

7. Add a new server declaration of RadTooltip on your page, and set Skin="MyCustomSkin" and EnableEmbeddedSkins="false":

   **ASP.NET**

   ```
    <telerik:RadToolTip RenderMode="Lightweight" runat="server" ID="RadToolTip1" EnableEmbeddedSkins="false" Skin="MyCustomSkin">
    </telerik:RadToolTip>
   ```

8. Register Tooltip.MyCustomSkin.css in the `<head>...</head>` section of your webpage. In order to have the CSS applied correctly, the base stylesheet should come first in the DOM:

   **HTML**

   ```
    <link rel="stylesheet" type="text/css" href="Skins/MyCustomSkin/ToolTip.MyCustomSkin.css">
    </link>
   ```

   Make sure the path to the files is correct, otherwise the skin will not apply.

9. Reload the page, and if the steps 1-8 have been followed correctly, you will see RadTooltip running a custom Default skin set as an external resource.

## RadToolTip for ASP.NET AJAX CSS: Classes and Their Use

**The Skin Stylesheet - ToolTip.MyCustomSkin.css**

**Main CSS Classes**

* .RadToolTip_MyCustomSkin.rtLoading loading image of RadToolTip

* div.RadToolTip_MyCustomSkin wrapping class

* div.RadToolTip_MyCustomSkin div.rtCallout tooltip tail wrapping class

* div.RadToolTip_MyCustomSkin.rtVisibleCallout div.rtCallout tooltip tail wrapping class

* div.RadToolTip_MyCustomSkin table.rtWrapper wrapping table of the control

* div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperTopLeft, div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperTopRight, div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperBottomLeft, div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperBottomRight tooltip corners

* div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperTopLeft top left corner

* div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperTopRight top right corner

* div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperBottomLeft bottom left corner

* div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperBottomRight bottom right corners

* div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperBottomCenter bottom center

* div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperTopCenter top center

* div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperLeftMiddle,

* div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperRightMiddle left and right middle

* div.RadToolTip_MyCustomSkin table.rtWrapper td.rtWrapperContent content cell

* div.RadToolTip_MyCustomSkin div.rtTitlebar titlebar

* div.RadToolTip_MyCustomSkin a.rtCloseButton close button

## Understanding the Image Sprites

Each skin of RadToolTip consists of three image sprites, that are contained in the Skins/SkinName/RadToolTip folder. These are:

1. Callouts.gif - the images for RadToolTip's buttons, as well as their hover states:

2. ToolTipSprites.gif - the horizontal sprites for the control

3. ToolTipVerticalSprites.gif - the vertical sprites for the control

4. Loading.gif - the loading indicator for the control

Below are visual schemes of the image sprites that are used to skin RadToolTip.

> caption Callouts.gif

![callouts](https://www.telerik.com/products/aspnet-ajax/documentation/assets/b50d2e0b3967054b0e64634429b8fcff/tooltip-callouts.gif)

> caption ToolTipSprites.gif

![callouts](https://www.telerik.com/products/aspnet-ajax/documentation/assets/3e49a1c145aa30a6b623eb83dca1b1f6/tooltipsprites.gif)

> caption CommandButtonSprites.gif

![callouts](https://www.telerik.com/products/aspnet-ajax/documentation/assets/ba7dc7a4675975f74a109e24afe58c3a/tooltipverticalsprites.gif)

## Modifying the Image Sprites to Achieve Totally New Looks for the Skin

Explained below is a simple method for modifying the image sprites of RadToolTip with Adobe© PhotoShop to achieve new looks without creating a new design.

1. Drag Callouts.gif, ToolTipSprites.gif andCommandButtonSprites.gif in Adobe© PhotoShop

2. From the menu bar select Image » Mode » RGB Color to prepare the images for editing (convert from optimized Indexed Color to RGB Color):

   ![hex to rgb](https://www.telerik.com/products/aspnet-ajax/documentation/assets/ac9c53f8d73eaeee89f0606c24e92f15/tooltip-indexedtorgb.gif)

3. Press Set Foreground Color in PhotoShop's toolbox to invoke the color picker dialog:

   ![foreground color](https://www.telerik.com/products/aspnet-ajax/documentation/assets/ab5302668d0c175c660d731601332d28/tooltip-presstoolbox.gif)

4. Select a color that you like from the color dialog and then close it:

   ![cloose color](https://www.telerik.com/products/aspnet-ajax/documentation/assets/264b5fa680f056672a21d58607692b6a/tooltip-colorpicker.gif)

5. Select Image » Adjustments Hue » / Saturation to open the Hue / Saturation dialog of Adobe© PhotoShop:

   ![choose hue](https://www.telerik.com/products/aspnet-ajax/documentation/assets/2da1e9d3eb0c519fbc93879824f2a40b/tooltip-choosehue.gif)

6. Check the colorize checbox in the Hue / Saturation dialog, and the image you have selected will be immediately colorized in the hue you have selected from the toolbox:

   ![choose hue](https://www.telerik.com/products/aspnet-ajax/documentation/assets/2da1e9d3eb0c519fbc93879824f2a40b/tooltip-choosehue.gif)

   You may then play with the Hue, Saturation and Lightness sliders to fine tune or further modify the image. Make sure you memorize the values of the sliders, as you will need to add the same settings to all three images in order to achieve consistent looks

7. Press "OK" when you are finished

8. Select Image Image » Mode » Indexed Color to flatten the layers of the image

9. Save and close the image

10. Repeat Steps 5 - 9 for each of the remaining images

11. After you are over and done with this, save your work and reload the page. You will have a brand new skin based on Telerik's Default skin of RadToolTip.

    ![callouts before](https://www.telerik.com/products/aspnet-ajax/documentation/assets/371b8038d9971d2218b5dfdd66d0fa26/tooltip-calloutsbefore.gif)

    ![callouts after](https://www.telerik.com/products/aspnet-ajax/documentation/assets/74128ec657f611d4ebdc168eaf3309fa/tooltip-calloutsafter.gif)

## See Also

* [Skins](https://www.telerik.com/products/aspnet-ajax/documentation/controls/tooltip/appearance-and-styling/skins)

* [Controlling Appearance](https://www.telerik.com/products/aspnet-ajax/documentation/controls/tooltip/appearance-and-styling/controlling-appearance)
