Skip to Content
ASP.NET 3.5 For Dummies®
book

ASP.NET 3.5 For Dummies®

by Ken Cox
February 2008
Intermediate to advanced
428 pages
8h 52m
English
For Dummies
Content preview from ASP.NET 3.5 For Dummies®

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, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 3.5 Unleashed

ASP.NET 3.5 Unleashed

Stephen Walther
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9780470195925Purchase book