
Chapter 10
254
Applying a custom (class) CSS style
Custom (class) CSS styles are the only type of CSS style that can be applied to any
text in a document, regardless of which tags control the text. The CSS Styles panel
displays the names of all available styles.
Do not confuse CSS styles with options such as Bold or Variable in the Text >
Style submenu; these options are predefined formatting attributes that correspond
to specific HTML tags.
When you apply two or more CSS styles to the same text, the styles may conflict
and produce unexpected results. See “About conflicting styles” on page 255.
To apply a custom CSS style:
1
Choose Window > CSS Styles.
2
Select the text to which you want to apply a CSS style.
Place the insertion point in a paragraph to apply the style to the entire paragraph.
To specify the exact tag to which the CSS style should be applied, select the
tag with the tag selector at the bottom left of the Document window. You can
also select the exact tag in the tag selector, right-click (Windows) or Control-
click (Macintosh) to reveal a context menu, and choose Set Class to see a list of
CSS styles to apply.
If you select a range of text within a single paragraph, the CSS style affects only
the selected range.
3
Click a style name in the CSS Styles panel.
You can also apply a CSS style by choosing a style name from the Text > CSS
Styles submenu, or by right-clicking (Windows) or Control-clicking (Macintosh)
and choosing the style name from the CSS Styles submenu in the context menu.
The tag of the current selection appears next to the Custom Style command.
Exporting styles to create a CSS style sheet
You can export styles from a document to create a new CSS style sheet. You can
then link to other documents to apply these styles.
To export CSS styles from a document and create a CSS style sheet:
1
Choose File > Export > Export CSS Styles or choose Text > Export Style Sheet.
The Export Styles as CSS File dialog box appears.
2
Enter a name for your style and click Save. The style is saved as a CSS style sheet.
Содержание 38028779 - Macromedia Dreamweaver - Mac
Страница 1: ...macromedia Using Dreamweaver...
Страница 148: ...Chapter 4 148...
Страница 296: ...Chapter 12 296...
Страница 472: ...Chapter 18 472...
Страница 512: ...Chapter 21 512...
Страница 562: ...Appendix 562...