10.3. Managing Style Rules

You see that style rules can live in many places: inline next to the control; embedded within the page; and stored in an external style sheet. VWD helps you track all these style rules and even shift them from one location to another.

10.3.1. Moving styles from a page to a style sheet

Here's a typical situation: You're adding to the Web site and realize that you've embedded styles in several pages. You want to consolidate the embedded styles into one external style sheet. Rather than embark on a frantic cut-and-paste blitz, follow these steps to move embedded styles to an external style sheet:

  1. If your project doesn't have an external cascading style sheet, add one (FileNew FileStyle Sheet).

  2. Open an ASP.NET page in Design view that includes embedded style rules or insert a style such as this:

    <style type="text/css">
        .rulez
        {font-size: xx-large;}
    </style>
  3. Open the Manage Styles pane (ViewManage Styles), as shown in Figure 10-6.

    Figure 10-6. The Manage Styles pane shows embedded and linked style sheets.
  4. In the Manage Styles pane, from the Current Page category, ...

Get ASP.NET 3.5 For Dummies® 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.