Dreamweaver CS4 Resources
|
Apply, remove, or rename class styles
Class 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. All class
styles associated with the current document are displayed in the
CSS Styles panel (with a period [.] preceding their name) and in
the Style pop‑up menu of the text Property inspector.
You’ll
see most styles updated immediately, however, you should preview
your page in a browser to verify a style was applied as expected.
When you apply two or more styles to the same text, the styles may
conflict and produce unexpected results.
 When
previewing styles defined in an external CSS style sheet, be sure
to save the style sheet to ensure that your changes are reflected
when you preview the page in a browser.
Apply a CSS class style- In the document, 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.
If you select a range of text within
a single paragraph, the CSS style affects only the selected range.
To
specify the exact tag to which the CSS style should be applied,
select the tag in the tag selector located at the lower
left of the Document window.
- To apply a class style, do one of the following:
In the CSS Styles panel (Window >
CSS Styles), select All mode, right-click the name of the style
you want to apply, and select Apply from the context menu.
In the HTML Property inspector, select the class
style you want to apply from the Class pop‑up menu.
In the Document window, right-click (Windows) or
Control‑click (Macintosh) the selected text, and in the context
menu, select CSS Styles and then select the style you want to apply.
Select Format > CSS Styles, and in the
submenu select the style you want to apply.
Remove a class style from a selection- Select the
object or text you want to remove the style from.
- In the HTML Property inspector (Window >
Properties), select None from the Class pop‑up menu.
Rename a class style- In the CSS
styles panel, right-click the CSS class style you want to rename
and select Rename Class.
 You can also rename
a class by selecting Rename Class from the CSS Styles panel options
menu.
- In the Rename Class dialog box, make sure that the class
you want to rename is selected in the Rename Class pop‑up menu.
- In the New Name text box, enter the new name for the
new class and click OK.
If the class you’re renaming is internal to the head of
the current document, Dreamweaver changes
the class name as well as all instances of the class name in the
current document. If the class you’re renaming is in an external
CSS file, Dreamweaver opens and changes the
class name in the file. Dreamweaver also
launches a site-wide Find and Replace dialog box so that you can
search for all instances of the old class name in your site.
|