Share via


New Style Dialog Box

The New Style dialog box provides options that let you define cascading style sheet (CSS) style attributes. A CSS style combines individual formatting and positioning attributes into an attribute set that you can apply all at the same time.

The New Style dialog box is divided into two panes. The top pane enables you to select where the style is defined and which element or class the style is applied to. The bottom pane lists nine general categories (Font, Block, Background, Border, Box, Position, Layout, List, and Table). When you select a category, the bottom pane shows the options for the selected category. As you select style options, the New Style dialog box creates CSS style definitions for you.

You can apply the CSS style attributes to a single Web page, or you can add style attributes to CSS style rules stored on external style sheets. External style sheets can be used to define a common appearance for many Web pages at the same time. Styles defined in a single Web page can only be applied to elements within that page.

To display the New Style dialog box and define a style

  1. Click Format on the main menu and then click New Style.

    The New Style dialog box appears.

  2. In the Selector drop down list, either select an HTML element or type a class name that will contain the style definition.

    A class name must be preceded by a period (.).

  3. In the Define in drop down list, select to define the style either in the current Web page, a new style sheet that will be added to the Web site, or an existing style sheet.

    If you select an existing style sheet, define its location in the URL text box.

  4. Select the Apply new style to document selection check box if you want the currently selected item in the Web page to be displayed by using the style properties.

  5. Select an option from the left pane and define the CSS style attributes.

Tasks

Walkthrough: Basic HTML Editing in Visual Web Developer

Walkthrough: Creating and Modifying a CSS File

UI Elements

To learn more about options for

See

Fonts

Font, Style Builder Dialog Box

Backgrounds

Background, Style Builder Dialog Box

Text

Text, Style Builder Dialog Box

Position of elements on a page

Position, Style Builder Dialog Box

Flow control, overflow, clipping, and printing page breaks

Layout, Style Builder Dialog Box

Borders, margins, and padding

Edges, Style Builder Dialog Box

Lists

Lists, Style Builder Dialog Box

The user interface (UI), tables, and visual effects

Other, Style Builder Dialog Box

See Also

Concepts

Working with CSS Overview

Reference

Color Picker Dialog Box

Font Picker Dialog Box