decorative banner

Creating class styles


    You can apply classes to any number of selections in a page and most any type of content including a block of text, a single table cell, an image, and a floating box. Typical uses of classes include distinctive formatting for headings, quotes, warning notes, or other special information-carrying items that need to stand out from the rest of the text. You can also use classes to create typographical effects, such as varying font sizes or font colors within a word.

    Note: Don't use classes to visually structure a document. Not only will this effect be completely lost on viewers with non-CSS browsers, but even worse, they will see a completely unstructured presentation of your page. Instead, use classes for local formatting, such as for inline text or single paragraphs.

To create a class style:

  1. In the CSS Editor, done one of the following:
    • Click the New Class Style button New Class Style button , or choose New Class Style from the context or CSS Editor menu.
    • Select an existing class style, and choose Duplicate from the context or Edit menu.
  2. Select the new style in the CSS Editor, and in the Basic set Basics set button of the CSS Inspector, type an alphanumeric class name, preceded by a period in the Name text box and with no spaces--for example, .myboldclass.
  3. Important: The leading period must precede the class name, otherwise the style changes to an HTML element style.

  4. In the CSS Inspector, add style properties. (See Defining style properties.)
  5. To apply the class style, select a range of text or an item in the document window, and select an option in the CSS palette. (See Applying styles.)
  6. Note: In the CSS palette, the options to apply class styles will vary depending upon the selection in the document window. For example, if text is selected, the CSS palette displays Inline, Par, and Div options. If a table cell is selected, the palette displays one option for the <td> tag.