Export (0) Print
Expand All
Expand Minimize

Styles, Add Style Rule Dialog Box

The Add Style Rule dialog box enables you to a new style rule to a CSS style sheet. The style rule can be associated with an HTML element, or it can define a class or element ID.

You can also add a style rule that applies to a hierarchy of elements, classes, and element IDs. For example, you can define a rule that is applied only to paragraphs of a certain class that follow an H2 heading.

To add a style rule to a CSS style sheet

  1. Open the CSS style sheet in the editor.

  2. In the Styles menu, click Add Style Rule.

    The Add Style Rule dialog box is displayed.

    NoteNote

    The Styles menu appears when you open an external CSS style sheet for editing. On the Styles menu, the Build Style option becomes available when you put the cursor inside the braces for a style rule.

  3. Select the style options that you want, and then click OK.

    The style rule is added to the CSS style sheet.

The style rules that you add by using this dialog box will be empty. For information about how to define the rule options, see Build Style Dialog Box.

Element

Shows the HTML element that the rule applies to.

Class name

Shows the name of the class that the rule applies to. You can select the Optional element check box and then select an HTML element from the list.

Element ID

Shows the text for the ID of an HTML element.

> button

Adds the selected Element, Class name, or Element ID value to the style-rule hierarchy.

Style rule hierarchy

Shows the hierarchy of elements, classes, and element IDs that define the style rule. You can select any node in the hierarchy and move it up the tree, move it down the tree, or remove it by using the Up, Down, or Delete buttons.

Style rule preview

Shows the style rule that will be created.

Community Additions

ADD
Show:
© 2014 Microsoft