Themes and Master Pages in ASP.NET 2.0 - A Perfect Combination
page 3 of 6
by Steven Swafford
Feedback
Average Rating: 
Views (Total / Last 10 Days): 32256/ 69

Incorporating Style Sheets

Consider the use of CSS to enhance the control and overall visual aspect of your application.  Add a new style sheet just as you previously did for the theme (see Listing 2), only this time select Style Sheet.  Once you have completed this step, your application will automatically apply this style sheet to your pages.

Note: The head tag must have the attribute runat="server."

Now, back in the style sheet you can apply items such as the page background color, font color and font size.

Listing 5

body 
{
      background-color: #000000;
      color: #FFFFFF;
      font-family: Arial, Verdana, Garamond;
      font-size: 10px;
}

Execute the application and you will now see that not only does the button control have a theme applied, but the style sheet has now changed the way the user interface looks.

Figure 4


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-10-16 1:33:14 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search