Monday, November 19, 2007

How to apply Classes to block of Text

How to apply Classes to block of Text

To apply Classes to block of Text

You can apply classes to any selected block of text, independent of the structure of the HTML document. Typical uses of classes include distinctive formatting for warning notes or other special information-carrying elements 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.

To create a style based on a class:

Step 1.

  • With the Style Sheet window in the foreground, click the New Class button in the style sheet toolbar. The new style is listed under Classes with its name selected.

Step 2.

  • In the Basics tab of the CSS Selector Inspector, type a class name in the Name text box, and press Enter.

  • You can use any alphanumeric character string as a class name—for example, "myboldclass". You don’t have to type the leading period.

Step 3.

  • In the CSS Selector Inspector added style properties to apply the class style, select a range of text (anything from a single character to multiple paragraphs) in the document window, and use the options in the Style tab of the Text Inspector.


No comments: