13.07.2015 Views

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

186<strong>ASP</strong>.<strong>NET</strong> <strong>3.5</strong>: A Beginner’s <strong>Guide</strong>create and use a style sheet with <strong>ASP</strong>.<strong>NET</strong> objects, not how to create a perfect sheet. Oneof the key elements of good design is a color scheme, and in building a style, you need toget a set of colors that will go together. So the project begins with getting a color scheme.The Color SchemeThe first step is to find a color scheme. You can go with something simple or elaborate, butbe careful, especially if you’re a developer. The colors in this example were extrapolatedfrom a book on color <strong>com</strong>binations, The Designer’s <strong>Guide</strong> to Color Combinations: 500+Historic and Modern Color Formulas in CMYK by Leslie Cabarga (North Light Books,1999). First, the CMYK values were changed to RGB values and then to hexadecimal.The following palette makes up the color schemes:Hex Value RGB (Decimal Values) Descriptive Name#C1272D (r:193, g:39, b:45) Brick red#C3B06F (r:195, g:176, b:111) Medium tan#D8CAA1 (r:216, g:202, b:161) Light tan#000000 (r:0, g:0, b:0) Black#FFFFFF (r:255, g:255, b:255) WhiteOnce you have the color scheme, use the Manage Styles tool to integrate your style intoyour style sheet. The following steps show you how to set your color scheme:1. Set your mode to Design, and place all of the objects and text you want to style inthe editor.2. Open the CSS style tool.3. Select New Style and in the Define In box, select New Style Sheet and click OK.At this point, it doesn’t really matter whether you have entered a style. If you have,be sure to name the style in the Selector box with a dot (.) definition—a periodprefix needs to be placed in the Selector window. For example, .inputData is anacceptable style name.4. When the Microsoft Visual Web Developer window appears, click Yes if you havea style you want in the style sheet. Otherwise click No.5. As soon as you click Yes or No, you will see a new style sheet next to your <strong>ASP</strong>X file.It will be named StyleSheet#.css, where # is a number. If this is your first style sheet,you will see it named StyleSheet1.css. Select File | Save StyleSheet#.css As, and youwill see the default path to a StyleSheet folder and the default name of your style sheet.Change the default name to Simple.css.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!