Defining styles for an element

You can define a style that is applied automatically to every occurrence of the same tag (for example, every <P> tag).
Prerequisite: Create a style sheet.

To create and apply a style for an element:

  1. Open the .css file that you want to edit by double-clicking the file in the Project Explorer view. The style sheet opens in the editing area.
  2. Click the New Style Rule Picture of the Add Style Rule icon icon. The Set Selector of New Style dialog box opens.
  3. Select the HTML tag radio button.
  4. In the HTML tag name field, select the tag.
  5. Click OK.
  6. Add a specific style definition using the New Style dialog box.
  7. Click OK and save your changes. The style that you have specified is displayed in the Styles view.
  8. To see the style definition properties, click the style in the Styles view. The definition of the style is displayed in the Properties view.
Tip: If you want to define a style for a single page, you can select the element in the Design page of Page Designer, click the Add Style Rule icon in the Styles view, and add a style definition. This style is embedded in the page header instead of in the style sheet, and is applied to this page only.
Related concepts
Cascading Style Sheet (CSS) Designer
Related tasks
Defining styles
Defining and applying class and ID styles
Specifying styles for predefined areas
Removing a specified style
Defining pseudo-HTML link styles

Feedback