Managing CSS

You use the CSS Styles panel to view, create, edit, and remove CSS styles, as well as to attach external style sheets to documents.

To open the CSS Styles panel:

To edit a rule in the CSS Styles panel (Current mode):

  1. Click the Current button at the top of the CSS Styles panel.
  2. Select a text element in the current page to display its properties.
  3. Do one of the following:

To edit a rule in the CSS Styles panel (All mode):

  1. Click the All button at the top of the CSS Styles panel.
  2. Do one of the following:

To add a property to a rule:

  1. Select a rule in the All Rules pane (All mode), or select a property in the Summary for Selection pane (Current mode).
  2. Do one of the following:

In both All and Current modes, the CSS Styles panel contains three buttons that let you alter the view in the Properties pane (the bottom pane):

Category View divides the Dreamweaver-supported CSS properties into eight categories: font, background, block, border, box, list, positioning, and extensions. Each category's properties are contained in a list that you expand or collapse by clicking the Plus (+) button next to the category name. Set properties appear (in blue) at the top of the list.

List View displays all of the Dreamweaver-supported CSS properties in alphabetical order. Set properties appear (in blue) at the top of the list.

Set Properties View displays only those properties that have been set. Set Properties view is the default view.

In both All and Current modes, the CSS Styles panel also contains the following buttons:



Attach Style Sheet opens the Link External Style Sheet dialog box. Select an external style sheet to link to or import into your current document. For information about attaching an external style sheet.

New CSS Rule opens a dialog box in which you can select the type of style you're creating--for example, to create a class style, redefine an HTML tag, or to define a CSS selector. For more information.

Edit Style opens a dialog box in which you can edit the styles in the current document or in an external style sheet. For information about updating a style sheet.

Delete CSS Rule removes the selected rule or property from the CSS Styles panel, and removes the formatting from any element to which it was applied. (It does not, however, remove references to that style).