10.2. Using the VWD Style Sheet Tools

Creating styles is a visual task in which real artistes don a beret and painter's smock, choose a style, such as a border color, apply it to a control, and then stand back to admire their work. In this section, you use the graphical tools in Visual Web Developer to design and preview CSS styles.

10.2.1. Attaching an external style sheet

In preparation for designing styles, you need a place to store your precious artistry. Follow these steps to attach a style sheet file to a page:

  1. In Solution Explorer, add a style sheet file to the project (Add New ItemStyle Sheet).

  2. Add an ASP.NET page to your project (for example, ssheet.aspx) and open it in Design view.

  3. Open the Apply Styles window (ViewApply Styles).

    Figure 10-2 shows the Apply Styles window.

  4. Click Attach Style Sheet.

    The Select Style Sheet dialog box opens.

    Figure 10-2. The Apply Styles window includes a link from which you can select a style sheet to reference in the page.
  5. Navigate the project folders to find the style sheet to attach and then click OK.

    The style sheet filename (for example, StyleSheet.css) appears in the Apply Styles window.

    From here, you need a control and a style. That's coming ...

Get ASP.NET 3.5 For Dummies® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.