6.3. Themes
So far you've seen how to create a master page to define the global look and feel of the pages in your site. You also saw how to centralize the behavior of your pages by using a central base page. There are, however, more ways to influence the look and feel of your site: themes and skins. Skins will be dealt with later in the chapter, as they are a part of themes, which need to be discussed first.
A theme is a collection of files that define the looks of a page. It can include skin files, CSS files, and images. You define themes in the special App_Themes folder in the root of your website. Within this folder you need to create one or more subfolders that define the actual themes. Inside each subfolder, you can have a number of files that make up the theme. Figure 6-12 shows the Solution Explorer for a web site that defines two themes: Monochrome and DarkGrey.
Figure 6-12. Figure 6-12
A link to each CSS file in the theme folder is added to your page's <head> section automatically whenever the theme is active. You'll see how this works later. The images in the themes folder are referenced from the CSS files. They can be used to change common elements of the web site, such as background images, or images used in bulleted lists or navigation lists.
To create a theme, you need to do the following:
Create the special App_Themes folder if it isn't already present in your ...
Get Beginning ASP.NET 3.5: In C# and VB now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.