Edit a css style sheet, Format css code, Set css code formatting preferences – Adobe Dreamweaver CC 2015 User Manual
Page 219

212
CSS
Last updated 6/3/2015
• You cannot use a link tag to add a reference from one external style sheet to another. If you want to nest style
sheets, you must use an import directive. Most browsers also recognize the import directive within a page (rather
than just within style sheets). There are subtle differences in how conflicting properties are resolved when
overlapping rules exist within external style sheets that are linked versus imported to a page. If you want to
import, rather than link to, an external style sheet, select Import.
5
In the Media pop-up menu, specify the target medium for the style sheet.
For more information on media-dependent style sheets, see the World Wide Web Consortium website at
6
Click the Preview button to verify that the style sheet applies the styles you want to the current page.
If the styles applied are not what you expect them to be, click Cancel to remove the style sheet. The page will revert
to its previous appearance.
7
Click OK.
More Help topics
Edit a CSS style sheet
Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS
Designer.
A CSS style sheet typically includes one or more rules. You can edit an individual rule in a CSS style sheet using the CSS
Styles panel, or if you prefer, you can work directly in the CSS style sheet.
1
In the CSS Styles panel (Window > CSS Styles), select All mode.
2
In the All rules pane, double-click the name of the style sheet you want to edit.
3
In the Document window, modify the style sheet as desired, and then save the style sheet.
Format CSS code
Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS
Designer.
You can set preferences that control the format of your CSS code whenever you create or edit a CSS rule using the
Dreamweaver interface. For example, you can set preferences that will place all CSS properties on separate lines, place
a blank line between CSS rules, and so on.
When you set CSS code formatting preferences, the preferences you select are automatically applied to all new CSS rules
that you create. You can, however, also apply these preferences manually to individual documents. This might be useful
if you have an older HTML or CSS document that needs formatting.
Note: CSS code formatting preferences apply to CSS rules in external or embedded style sheets only (not to in-line styles)
Set CSS code formatting preferences
1
Select Edit > Preferences.